.TITLE ERQIO - QIO Errors .IDENT /V01.00/ .ENABL LC ;+ ; This module processes QIO errors by outputing the QIO status code value, ; the matching message from LB:[1,2]QIOSYM.MSG, and an optional line with ; the logical unit number and device name. ; ; (taskname) -- [Exiting due to] QIO error (i/o error number) ; (i/o error message from qiosym) ; Lun: (lun number) Device: (device name lun assigned to) ; at PC (pc) ; ; Call with: MOV ERR,-(SP) ; MOV LUN,-(SP) ; JSR PC,ERQIOX (or ERQIOR) ; ; ERR = I/O error code. ; LUN = Logical unit number. ; ; Exit with: ERQIOR -> Message output and return to caller (PSW/CS). ; ERQIOX -> Message output and task exit (with error status). ;- .MCALL GLUN$S .PSECT ERR$TX,RO,D QIOERR: .ASCIZ /QIO/ QIOLUN: .ASCIZ /Lun: / QIODEV: .ASCIZ / Device: / .PSECT ERR$CD,RO,I ERQIOX::INC (SP) ;Set to exit ERQIO:: MOV #9999$,-(SP) ;Set return address JSR PC,$SAVAL ;Save all registers MOVB 22(SP),R2 ;Get error number NEG R2 ; CALL ERTXT ;Get the error message from QIOSYM MOVB 22(SP),R0 ;Get error number MOV #QIOERR,R1 ;Get the error type message MOV 20(SP),R3 ;Get the PC MOV 24(SP),R4 ;Get the lun number MOV #QIOLIN,R5 ;Set the QIO optional line processor CALLR ERMSG ;Go processor the error and return ; ; Clean up on return. ; 9999$: MOV (SP),4(SP) ;Set return addres ADD #4,SP ;Clean stack SEC ;Set error RETURN ;Return to caller ;+ ; This routine formats the optional line in a QIO error message. It ; outputs the logical unit and device name. ;- QIOLIN: MOV #QIOLUN,R1 ;Get lun message CALL ERMOV ;Place in buffer MOV R4,R1 ;Get lun number CLR R2 ;Set for no leading zeros CALL $CBDMG ;Convert to ascii decimal MOV #QIODEV,R1 ;Get device message CALL ERMOV ;Place in buffer MOV #ERRTMP,R2 ;Get a buffer GLUN$S R4,R2 ;Get the device information BCS 9999$ ; if CS - skip on error MOVB (R2)+,(R0)+ ;Store device name MOVB (R2)+,(R0)+ ; MOVB (R2),R1 ;Get the unit number BIC #177400,R1 ;Only want low byte CLR R2 ;Set for no leading zeros CALL $CBOMG ;Convert to ASCII octal MOVB #':,(R0)+ ;Store closing colon 9999$: RETURN ; .END