* BAUD.A PTDOS terminal baud rate change coomand * by TMQ 6/15/79 for P.T. 3P + S I/O board * form: BAUD # * where # = 3 for 300 baud * = 9 for 9600 baud * board must be jumpered for these speeds * COPY NPTDEFS get system definitions ORG CXBUF load address XEQ START start address * START MVI A,PSOPT read characters until delimiter LXI D,BUFPS point to parameter scanner buffer CALL PSCAN parameter scanner JC ERRPS scanner error JZ ERRSY syntax error CPI 0DH carriage return JZ OKDEL CR is a valid delimiter CPI ';' semicolon JNZ ERRSY if not a ; then invalid delimiter OKDEL MOV A,C get # of characters scanned CPI 1 is it a one JNZ ERRSY no, syntax error LXI H,DONE set up for return LDA BUFPS get character scanned CPI '3' 300 baud JZ B300 set if match CPI '9' 9600 baud JZ B9600 set if match * error handlers follow ERRSY MVI A,0 control word LXI H,-1 no 2nd line message CALL UTIL system utility call DB UXOP explain error JMP ABORT error return DB -1 no operation code ERRCD DB 2AH error code, command syntax error unless patched * drastic error handler ABORT CALL SYS system call, normal return, not used DB RESOP drastic return to DOS and reset all ERRPS MOV A,E move error code STA ERRCD store it JMP ERRSY let system utility handle error * set baud rate routines B300 MVI A,04H 9600 baud control word PCHL go to DONE B9600 MVI A,08H 300 baud control word DONE OUT 0 send to control port CALL SYS system call DB RETOP normal return to system BUFPS DS 20 parameter scanner buffer END