; ****************************************************************** .TITLE XXX_ERROR ; this module contains some handy error reporting routines ; for general usage for those people using RMS ; Modified: 1-14-81 WSK for Rls. 3 (general addressing modes) ; ****************************************************************** ; .LIBRARY/SYS$LIBRARY:LIB.MLB/ .PSECT XXX_DATA XXX_DESC: .LONG 0,0 XXX_STRING: .ASCID /Error occurred while processing: !AS / FAO_DESC: .LONG 256,FAO_BUFF FAO_BUFF: .BLKB 256 .PSECT XXX_ERROR $FABDEF $RABDEF REPORT_ERROR:: ; ; this is a routine to be called as the rms error routine ; it is at ast level ; this is the choice if you want to exit on an error ; otherwise use report_err_ret .WORD ^M MOVL 4(AP),R10 ;address of structure at fault BSBW REPORT ;go report error $EXIT_S report_err_ret:: ; ; this is a routine to be called as the rms error routine ; it is at ast level ; use this one if you want to return ; and report_error if you want the program to exit .WORD ^M MOVL 4(AP),R10 ;address of structure at fault BSBW REPORT ;go report error RET REPORT_ERR:: ; ; this is a routine to be called at non-ast level ; it's useful if you only want to report certain errors ; R10 is the address of the structure at fault ; R0 is the error code ; PUSHL R0 PUSHL FAB$L_STV(R10) PUSHL R0 BRB r REPORT:: ; ; this is the common routine that prints the message ; ASSUME FAB$L_STS EQ RAB$L_STS PUSHL FAB$L_STS(R10) PUSHL FAB$L_STV(R10) MOVL FAB$L_STS(R10),R0 BICL #7,R0 ADDL2 #3,R0 PUSHL R0 R: CMPB FAB$B_BID(R10),#FAB$C_BID BEQL 5$ MOVL RAB$L_FAB(R10),R10 ; if r10 is rab,make it the fab 5$: ; use whichever file specification is available ; in this order, namblk resultant string, namblk expanded string ; and finally the fab's file string ; TSTL FAB$L_NAM(R10) BEQL NO_NAM ; no namblk, must use fab's fna MOVL FAB$L_NAM(R10),R0 ; get address of namblk TSTB NAM$B_RSL(R0) BEQL NO_RSA MOVL NAM$L_RSA(R0),XXX_DESC+4 MOVZBL NAM$B_RSL(R0),XXX_DESC BRB GOT_STRING NO_RSA: TSTB NAM$B_ESL(R0) BEQL NO_NAM MOVL NAM$L_ESA(R0),XXX_DESC+4 MOVZBL NAM$B_ESL(R0),XXX_DESC BRB GOT_STRING NO_NAM: MOVL FAB$L_FNA(R10),XXX_DESC+4 MOVZBL FAB$B_FNS(R10),XXX_DESC GOT_STRING: $FAO_S XXX_STRING,FAO_DESC,FAO_DESC,#XXX_DESC PUSHAL FAO_DESC CALLS #1,G^LIB$PUT_OUTPUT CALLS #2,G^LIB$SIGNAL POPR #^M RSB .end