.TITLE AUXERR DPACP Auxiliary task error reporting .PSECT AUXERR .IDENT /M002/ ;+ ; ; AUXERR ; Error message processing for DPACP auxiliary task ; BADMSG for directive errors, no return ; ERRMSG for network errors, returns ; ; PARAMETERS ; R0 should point to the specific error string ; ; EXTERNAL REFERENCES ; TIQIO A QIO DPB to do a write to the terminal ; TIBUF Pointer to the buffer parameter in the above ; TILEN Pointer to the length " " ; ; AUTHOR ; Daniel McCoy Informatics Inc. Palo Alto, Ca. ; ; REVISIONS LAST CHANGE - 23-JAN-79 - DSM ; DATE PERSON STATEMENT OF CHANGES ; 1/5/79 DSM Original coding ; ; NOTES ; ;- .MCALL DIR$,EXIT$S ; TAB=11 LF=12 CR=15 ; ; Directive error: print message and DSW; then exit ; R0 points to the message for the specific directive BADMSG:: ; Say which directive MOV #BF2L,R2 MOV #MBF2,R1 ; Directive name pointer already in R0 10$: MOVB (R0)+,(R1)+ SOB R2,10$ ; Move DIRECTIVE to error type MOV #BF1L,R2 MOV #MBF1,R1 MOV #DIRM,R0 20$: MOVB (R0)+,(R1)+ SOB R2,20$ ; Put directive status byte in buffer MOV #MBF3,R0 ; Address of buffer MOV $DSW,R1 ; Get DSW CLR R2 ; Zero suppress CALL $CBTMG ; Convert to Ascii SUB #MSGBF,R0 ; Get length of message MOV R0,TILEN MOV #MSGBF,TIBUF ; Point to message buffer DIR$ #TIQIO ; Write it ; EXIT$S ; Quit on directive error ; ; Network error: print message and status block; then return ; R0 points to the specific message ERRMSG:: PUSH ; Say which directive MOV #BF2L,R2 MOV #MBF2,R1 ; Directive name pointer already in R0 10$: MOVB (R0)+,(R1)+ SOB R2,10$ ; Move I/O to error type MOV #BF1L,R2 MOV #MBF1,R1 MOV #IOM,R0 20$: MOVB (R0)+,(R1)+ SOB R2,20$ ; ; Put status word in buffer MOV #MBF3,R0 ; Address of buffer MOVB NTSTAT,R1 ; Get first status byte CLR R2 ; Zero suppress CALL $CBTMG ; Convert to Ascii MOVB #TAB,(R0)+ ; Separate with tab MOVB NTSTAT+1,R1 ; Get second status byte CLR R2 ; Zero suppress CALL $CBTMG ; Convert to Ascii MOVB #TAB,(R0)+ ; Separate with tab MOV NTSTAT+2,R1 ; Get second status word CLR R2 ; Zero suppress CALL $CBOMG ; Convert to Ascii SUB #MSGBF,R0 ; Get length of message MOV R0,TILEN MOV #MSGBF,TIBUF ; Point to message buffer DIR$ #TIQIO ; Write it ; POP ; Restore registers RETURN ; Let the program try to recover ; .NLIST BEX ; Save some paper ; IOM: .ASCII % I/O % ; For ERRMSG DIRM: .ASCII /DIRECTIVE/ ; For BADMSG BF1L=.-DIRM ; R0 should point to one of these on entry to this module: BADQ:: .ASCII /QIO/ ; Queue I/O BADI:: .ASCII /QII/ ; Device init QIO BADG:: .ASCII /GND/ ; Get network data BADA:: .ASCII /ACC/ ; Accept network connection BADR:: .ASCII /REC/ ; Receive from network BADS:: .ASCII /SND/ ; Send through network BADCL:: .ASCII /CLS/ ; Close network BADO:: .ASCII /OPN/ ; Open network BF2L=.-BADO ; ; Error message output buffer MSGBF: .ASCII /* ACPAUX / MBF1: .BLKB BF1L ; Space for error type .ASCII / Error from / MBF2: .BLKB BF2L ; Space for specific error .ASCII / error code: / MBF3: .BLKB 22 ; Space for return status printout ; .END