Trailing-Edge
-
PDP-10 Archives
-
AP-D480B-SB_1978
-
err3.mac
There are 12 other files named err3.mac in the archive. Click here to see a list.
TITLE ERR3 -- FATAL ERROR MESSAGE GENERATOR
SUBTTL DONALD LEWINE -- 12-JUNE-72
;THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY ONLY BE USED
; OR COPIED IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE.
;COPYRIGHT (C) 1976,1977 BY DIGITAL EQUIPMENT CORPORATION
HISEG
VWHO==0
VERR3==1
VMINOR==0
VEDIT==:1
%%ERR3==<BYTE (3)VWHO(9)VERR3(6)VMINOR(18)VEDIT>
;AC USAGE
T1=1
T2=2
M=3 ;MESSAGE POINTER
P=17 ;PUSH DOWN POINTER
;ERR3 IS CALLED WHEN AN ERROR IS FOUND IN THE INTERNAL DATA BASE
; OF THE FORTRAN COMPILER. ERR3 GENERATES A MESSAGE OF THE
; FORM:
; ?
; ? Internal compiler error processing statement nnnn
; ? Call to <entry> from xxxxxx
;
;IF DDT IS LOADED CONTROL TRANSFERS TO DDT.
;
;ALL AC'S AS RESTORED PRIOR TO EXIT FROM ERR3 AND THE STACK IS
; LEFT AT THE SAME DEPTH AS WHEN ERR3 WAS CALLED. SEVERAL LOCATIONS
; BEYOND THE END OF THE STACK ARE CLOBBERED. THERE ARE NO TEMPS AND
; ALL CODE IS IN THE HISEG.
DEFINE ERRORL(A),<
XLIST
IRP A,<
A:: PUSH P,M ;SAVE M ON STACK
MOVEI M,[ASCIZ /A/] ;LOAD NAME OF ENTRY POINT
JRST ERR3 ;BOMB OUT
>
LIST
>
;CALL TO ERRORL LIST ALL DEFINED ENTRY POINTS
ERRORL <SKERR,CGERR>
ERR3: OUTSTR [ASCIZ /?
? Internal compiler error processing statement /]
PUSH P,T1
PUSH P,T2
PUSHJ P,TYPISN
OUTSTR [ASCIZ /
? Call to /]
OUTSTR (M) ;PRINT THE ROUTINE NAME
OUTSTR [ASCIZ / FROM /];MAKE MESSAGE LOOK NICE
MOVEI T1,6 ;SIX DIGITS
HRLZ M,-3(P) ;GET CALLING PC
OOPSL: SETZ T2, ;CLEAR T2
LSHC T2,3 ;SHIFT IN AN OCTAL DIGIT
TRO T2,60 ;CONVERT TO ASCII
OUTCHR T2 ;OUTPUT THE DIGIT
SOJG T1,OOPSL ;LOOP OVER THE PC
OUTSTR [ASCIZ /
/] ;GIVE A CRLF
HRRZ M,.JBDDT## ;GET POINTER TO DDT
MOVEM M,1(P) ;STORE AWAY
POP P,T2 ;PUT BACK THE AC'S
POP P,T1 ; ..
POP P,M ; ..
SKIPN 4(P) ;IS DDT THERE?
EXIT ;NO--GOOD BY
OUTSTR [ASCIZ /
DDT EXECUTION:
/]
JRST @4(P) ;GO TO DDT
TYPISN: MOVE T1,ISN##
TYPISL: IDIVI T1,^D10
HRLM T2,(P)
SKIPE T1
PUSHJ P,TYPISL
HLRE T1,(P)
MOVMS T1
ADDI T1,"0"
OUTCHR T1
POPJ P,
END