.TITLE ERFCS - FCS Errors .IDENT /V01.00/ .ENABL LC ; ; This module process FCS errors by outputing a message which includes ; the FCS error code and the matching message from LB:[1,2]QIOSYM.MSG. ; ; (taskname) -- [Exiting due to] FCS error (f.err) ; (fcs error message from qiosym) ; Lun: (lun number) Device: (device name) File: (filename) ; at PC (pc) ; ; Call with: JSR PC,ERFCSX (or ERFCSR) ; R0 = FDB address. ; ; Exit with: ERFCSR -> Message output and return to caller (PSW/CS). ; ERFCSX -> Message output and task exit (with error status). ;- .MCALL GLUN$S .PSECT ERR$TX,RO,D FCSERR: .ASCIZ /FCS/ FCSLUN: .ASCIZ /Lun: / FCSDEV: .ASCIZ / Device: / FCSFIL: .ASCIZ / File: / .PSECT ERR$CD,RO,I ERFCSX::INC (SP) ;Set to exit ERFCS:: JSR PC,$SAVAL ;Save all registers MOV R0,R4 ;Save FDB address MOVB F.ERR+0(R4),R2 ;Get error number NEG R2 ; as a positive number TSTB F.ERR+1(R4) ;Is this I/O or directive error BEQ 1000$ ; if EQ - I/O error ADD #128.,R2 ;Directive errors start at 129 1000$: CALL ERTXT ;Get the error message from QIOSYM MOVB F.ERR+0(R4),R0 ;Get error number MOV #FCSERR,R1 ;Get the error type message MOV 16(SP),R3 ;Get the error PC MOV #FCSLIN,R5 ;Set the FCS optional line processor CALLR ERMSG ;Go processor the error and return ;+ ; This routine formats the optional line in a FCS error message to: ; Lun: (lun number) Device: (device name) File: (filename) ;- FCSLIN: MOV #FCSLUN,R1 ;Get lun message CALL ERMOV ;Place in buffer MOVB F.LUN(R4),R1 ;Get lun number BIC #177400,R1 ;Only want low byte CLR R2 ;Set for no leading zeros CALL $CBDMG ;Convert to ASCII decimal MOV #FCSDEV,R1 ;Get device message CALL ERMOV ;Place in buffer MOVB F.LUN(R4),R1 ;Get the lun number BIC #177400,R1 ;Only want low byte MOV #ERRTMP,R2 ;Get the temp buffer GLUN$S R1,R2 ;Get the device information BCS 1000$ ; 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 1000$: MOV #FCSFIL,R1 ;Get file message CALL ERMOV ;Place in buffer ADD #F.FNB+N.FNAM,R4;Position R4 at filename MOV (R4)+,R1 ;Get filename in RAD50 CALL $C5TA ;Convert to ASCII MOV (R4)+,R1 ;Get filename in RAD50 CALL $C5TA ;Convert to ASCII MOV (R4)+,R1 ;Get filename in RAD50 CALL $C5TA ;Convert to ASCII MOVB #'.,(R0)+ ;Put in extension seperator MOV (R4)+,R1 ;Get extension CALLR $C5TA ;Convert to ASCII and return .END