.MCALL .MODULE .MODULE SLPERR,VERSION=04,COMMENT=,IDENT=NO ; Copyright (c) 1998 by Mentec, Inc., Nashua, NH. ; All rights reserved ; ; This software is furnished under a license for use only on a ; single computer system and may be copied only with the ; inclusion of the above copyright notice. This software, or ; any other copies thereof, may not be provided or otherwise ; made available to any other person except for use on such ; system and to one who agrees to these license terms. Title ; to and ownership of the software shall at all times remain ; in Mentec, Inc. ; ; The information in this document is subject to change without ; notice and should not be construed as a commitment by Digital ; Equipment Corporation, or Mentec, Inc. ; ; Digital and Mentec assume no responsibility for the use or ; reliability of its software on equipment which is not supplied ; by Digital or Mentec, and listed in the Software Product ; Description. ; Edit History: ; ; 001 12-Feb-80 09:39 Metsch, James (29602) [240,122] ; Initialize trap vectors for XM ; (001) ; 002 12-Nov-80 03:44 PM Kent, Jeff [240,94] ; Create [1,23]SLP-W-Audit trail overwrites existing audit trail ; (002) ; ; 8-MAR-85 George Thissell ; Fix device full error message ; ; Jonathan M. Taylor 4-May-78 ; ; MODIFICATIONS: ; ; X03.01 13-AUG-79 Added code to check for 'RENAME' and 'CLOSE' ; -MBG- errors due to protected files. ;MG01 ; ;- .SBTTL Error Message Text ELSLPR == 1 ;Edit level ;001 ;001 .MACRO ERM NAME, TEXT .IIF NDF ..., ... = 0 E$'NAME == ... ... = ... + 1 .IF B, .IFTF .PSECT TAB .IIF NDF TABLE, TABLE: .IFT 0 .IFF .PSECT TXT $$ = . .ASCII %TEXT% .ASCII <200> .PSECT TAB $$ .ENDC .ENDM .NLIST MEB ERM CORE, ERM EXTR, ERM SWIT, ERM NOVA, ERM ILVA, ERM LNSM, ERM CEOF, ERM SEOF, ERM LTOL, ERM ATOL, ERM CSYN, ERM LNER, ERM SNSP, ERM BUG, ERM HARD, ERM WEOF, ERM RERR, ;MG01 ERM CERR, ;MG01 ERM ILRE, ;MG01 ERM FNF, ;MG01 ERM ATAT, ;002 ERM ILDE, ERM CBDH, ERM NUTF, ERM CCKE, ERM SCKE, ERM RDER, ERM VER, .LIST MEB .SBTTL Trap Processor .PSECT .MCALL .PRINT .RCTRLO USERRB = 53 ; error byte location SUCCS$ = 1 ;Success WARN$ = 2 ;Warning ERROR$ = 4 ;Error FATAL$ = 10 ;Fatal UNCON$ = 20 ;Unconditional SEVERE = 10 ; and severity bits WARN = 2 ; $ERMSG handles TRAP instructions. The low byte of the TRAP instruction ; contains a code describing the error that occured. Negative codes are ; FATAL errors and cause control to return to $SLIPR. Positive codes are ; WARNING errors and cause control to return to the instruction following ; the TRAP instruction. ; ; R0 may have three values: ; ; R0 = 0 -> No optional error message (a message in addition to the ; error table message) ; R0 = start address of buffer -> Print the message R0 points to. ; This is the optional error message. ; R0 = -1 -> An ASCII device name is to be appended to the error ; message. The start address of the RAD50 name is ; in R2 $ERMSG:: MOV R0, -(SP) ; save R0, R1 in case of WARNING MOV R1, -(SP) MOVB #'W, LEVEL ; assume WARNING MOV 4(SP), R0 ; R0 = old PC MOV -(R0), R0 ; R0 = trap instruction CLR R1 ; put trap code in R1 BISB R0, R1 ; like so ASLB R1 ; get index to table. C-bit=severity BCC 10$ ; branch if WARNING MOVB #'F, LEVEL ; set SEVERE 10$: MOV TABLE(R1), R1 ; R1 = error text address BEQ 15$ ; don't print if zero ROR -(SP) ; get the carry .RCTRLO .PRINT #MESSAG ; print out name .PRINT R1 ; and print corresponding message MOV 4(SP), R0 ; R0 -> optional error message BEQ 12$ ; br if none CMP R0,#-1 ; Convert a filename to ASCII? BNE 11$ ; If no, branch MOV R2,R0 ; R0 = RAD50 filename address MOV #NAMBUF,R1 ; Get output buffer CALL $FNASC ; Convert filename to ASCII CLRB (R1)+ ; Put in terminator for .PRINT MOV #NAMBUF,R0 ; R0 = buffer start 11$: .PRINT ; print optional error message BR 14$ 12$: CLR R0 .PRINT 14$: ROL (SP)+ ; get the carry 15$: BCC 20$ ; branch if WARNING BISB #,@#USERRB ; inform monitor JMP $SLIPR ; go to main line editor to restart 20$: BISB #,@#USERRB ; inform monitor MOV (SP)+, R1 ; restore R0, R1 MOV (SP)+, R0 RTI ; WARNING error returns to the TRAP site MESSAG: .ASCII /?SLP-/ LEVEL: .ASCII /x-/<200> .END