; These Macros give you a MACRO interface to the error output subroutines ; They are all located in library ERRORS.MLB. ; ; Some bug fixes done by Volker Huck, 25-Aug-1989 ; ; CMPBYT and CMPWRD are only aids for the other macros .MACRO CMPBYT loc,msk,adr CMPB #msk,loc ;Is mask equal location? BEQ adr ; if EQ - yes. .ENDM CMPBYT .MACRO CMPWRD LOC,MSK,ADR CMP #msk,loc ;Is mask equal location? BEQ adr ; if EQ - yes. .ENDM CMPWRD ; ; Handle Directive errors ; .MACRO DIRERR cndlst,?defadr BCC defadr ; if CC - directive OK .IF NB ; .MCALL CMPWRD ; .IRP code, ; CMPWRD $DSW,code,defadr ;Compare codes .ENDR ; .ENDC ; .IF NDF D$$MSG ; JSR PC,ERDIRX ;Issue error and exit .IFF ; HALT ;Halt the program .ENDC ; defadr: ; .ENDM DIRERR ; .MACRO DIRWRN cndlst,contin,?defadr BCC defadr ; if CC - directive OK ; .IF NB ; .MCALL CMPWRD ; .IRP code, ; CMPWRD $DSW,code,defadr ;Compare codes .ENDR ; .ENDC ; .IF NDF D$$MSG ; JSR PC,ERDIR ;Issue error and return .ENDC ; .IF NB ; JMP contin ;Goto specified address .ENDC ; defadr: ; .ENDM DIRWRN ; ; ; Handle FCS errors ; .MACRO FCSERR cndlst,?defadr BCC defadr ; if CC - FCS ok .IF NB ; .MCALL CMPBYT ; .IRP code, ; CMPBYT F.ERR(R0),code,defadr ;Compare codes .ENDR ; .ENDC ; .IF NDF F$$MSG ; JSR PC,ERFCSX ;Issue error and exit .IFF ; HALT ;Halt the program .ENDC ; defadr: ; .ENDM FCSERR ; .MACRO FCSWRN cndlst,contin,?defadr BCC defadr ; if CC - FCS ok .IF NB ; .MCALL CMPBYT ; .IRP code, ; CMPBYT F.ERR(R0),code,defadr ;Compare codes .ENDR ; .ENDC ; .IF NDF F$$MSG ; JSR PC,ERFCS ;Issue error and return .ENDC ; .IF NB ; JMP contin ;Goto specified address .ENDC ; defadr: ; .ENDM FCSWRN ; ; ; Handle user initiated errors ; .MACRO PRGERR msgadr MOV msgadr,-(SP) ;Save message address JSR PC,ERPRGX ;Output message and exit .ENDM PRGERR ; .MACRO PRGWRN msgadr,contin MOV msgadr,-(SP) ;Save message address JSR PC,ERPRG ;Output message and return .IF NB ; JMP contin ;Goto specified address .ENDC ; .ENDM PRGWRN ; ; ; Handle QIO errors ; .MACRO QIOERR ios,lun,cndlst,?defadr CMPB #IS.SUC,ios ;Was I/O successful? BEQ defadr ; if EQ - yes .IF NB ; .MCALL CMPBYT ; .IRP code, ; CMPBYT ios,code,defadr ;Compare codes .ENDR ; .ENDC ; .IF NDF Q$$MSG ; .IF NB ; MOV lun,-(SP) ;Save lun number .IFF ; CLR -(SP) ;Set no lun .ENDC ; MOV ios,-(SP) ;Save I/O code JSR PC,ERQIOX ;Issue error and exit .IFF ; HALT ;Halt the program .ENDC ; defadr: ; .ENDM QIOERR ; .MACRO QIOWRN ios,lun,cndlst,contin,?defadr CMPB #IS.SUC,ios ;Was I/O successful? BEQ defadr ; if EQ - yes .IF NB ; .MCALL CMPBYT ; .IRP code, ; CMPBYT ios,code,defadr ;Compare codes .ENDR ; .ENDC ; .IF NDF Q$$MSG ; .IF NB ; MOV lun,-(SP) ;Save lun number .IFF ; CLR -(SP) ;Set no lun .ENDC ; MOV ios,-(SP) ;Save I/O code JSR PC,ERQIO ;Issue error and return .ENDC ; .IF NB ; JMP contin ;Goto specified address .ENDC ; defadr: ; .ENDM QIOWRN ;