Trailing-Edge
-
PDP-10 Archives
-
cobol12c
-
tracer.mac
There are 24 other files named tracer.mac in the archive. Click here to see a list.
; UPD ID= 2532 on 2/19/80 at 3:53 PM by NIXON
TITLE TRACER FOR COBOL V12C
SUBTTL NODE TRACING ROUTINES W. NEELY/CAM/SEB
SEARCH COPYRT
SALL
;COPYRIGHT (C) DIGITAL EQUIPMENT CORPORATION 1974, 1985
;ALL RIGHTS RESERVED.
;
;THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED AND COPIED
;ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE.
SEARCH P
%%P==:%%P
;EDITS
;V10*****************
;NAME DATE COMMENTS
;ACK 31-JAN-75 SAVE A TREE.
;********************
TWOSEG
.COPYRIGHT ;Put COPYRIGHT statement in .REL file.
RELOC 400000
SALL
ENTRY PTNOD. ;LIST CURRENT NODE
ENTRY PTACT. ;LIST ACTION AT CURRENT NODE
ENTRY PTTYP. ;LIST CURRENT SOURCE POSITION AND ITEM
ENTRY PTPSH. ;LIST PUSH-DOWN NODE
ENTRY PTPOP. ;LIST NODE POPING-UP TO
;PUT CURRENT NODE IN LISTING FILE
PTNOD.: TSWF FNDTRC ;TRACING?
SKIPN TRACFL##
POPJ PP, ;NO
JUMPE W2,.-1 ;IGNORE INITIAL CALL FROM COBOLB
SKIPE TRCLN2 ;DO WE NEED TO RANGE CHECK
PUSHJ PP,CHKTRC ;YES
MOVEI CH,11 ;START LINE WITH 2 TABS
PUSHJ PP,PUTLST
PUSHJ PP,PUTLST
MOVE NODE,(NODPTR) ;GET CURRENT NODE
MOVE TA,[POINT 6,-1(NODE)] ;LIST IT
N0: HRRZI TC,6
N1: ILDB CH,TA
JUMPE CH,N2
ADDI CH,40
PUSHJ PP,PUTLST##
SOJG TC,N1
N2: HRRZI CH,11 ;TAB
MOVE NODE,(NODPTR) ;RESTORE (NODE)
JRST PUTLST
;PUT ACTION AT CURRENT NODE IN LISTING FILE
PTACT.: TSWF FNDTRC ;TRACING?
SKIPN TRACFL
POPJ PP, ;NO
JUMPE W2,.-1 ;IGNORE INITIAL CALL FROM COBOLB
SKIPE TRCLN2 ;DO WE NEED TO RANGE CHECK
PUSHJ PP,CHKTRC ;YES
MOVE NODE,(NODPTR) ;GET CURRENT NODE
HLRZ TE,(NODE) ;GET ITS ACTION
JUMPE TE,.+3
CAIG TE,4000 ;IS IT AN ERROR NODE?
JRST PTERR. ;YES
MOVE TA,[POINT 6,-1(TE)] ;NO, LIST ACTION
JUMPN TE,N0
HRRZI TE,NOACT+1
JRST N0
PTERR.: MOVEI CH,"E" ;PRINT "E.###"
PUSHJ PP,PUTLST
MOVEI CH,"."
PUSHJ PP,PUTLST
HRRZ NODE,(NODPTR)
HLRZ TB,(NODE)
PUSHJ PP,PUTDEC##
JRST N2
;PUT "<NODE AT WHICH PUSHDOWN OCCURS> !!!!!!" IN LISTING FILE
PTPSH.: TSWF FNDTRC ;TRACING?
SKIPN TRACFL
POPJ PP, ;NO
SKIPE TRCLN2 ;DO WE NEED TO RANGE CHECK
PUSHJ PP,CHKTRC ;YES
PUSHJ PP,PTNOD. ;LIST NODE FROM WHICH PUSHING DOWN
MOVEI CH,"!" ;LIST "!!!!!!"
JRST PTPOP2
;PUT "<NODE TO WHICH POPING UP> ^^^^^^" IN LISTING FILE
PTPOP.: TSWF FNDTRC ;TRACING?
SKIPN TRACFL
POPJ PP, ;NO
SKIPE TRCLN2 ;DO WE NEED TO RANGE CHECK
PUSHJ PP,CHKTRC ;YES
PUSHJ PP,PTNOD. ;LIST NODE POPPED UP TO
MOVEI CH,"^" ;LIST "^^^^^^"
PTPOP2: MOVEI TB,6
PUSHJ PP,PUTLST
SOJG TB,.-1
MOVEI CH,11 ;TAB
PUSHJ PP,PUTLST
JRST PTTYP. ;LIST CURRENT TYPE & EXIT
;PUT CURRENT SOURCE POSITION AND ITEM IN LISTING FILE
PTTYP.: TSWF FNDTRC ;TRACING?
SKIPN TRACFL
POPJ PP, ;NO
JUMPE W2,.-1 ;IGNORE INITIAL CALL FROM COBOLB
SKIPE TRCLN2 ;DO WE NEED TO RANGE CHECK
PUSHJ PP,CHKTRC ;YES
LDB TB,[POINT 13,W2,28] ;GET CURRENT SOURCE LINE
MOVEI CH,"[" ;LIST "[LINE,CHR]"
PUSHJ PP,PUTLST
MOVEI CH,"0"
PUSHJ PP,PUTLST
CAIGE TB,^D10
PUSHJ PP,PUTLST
CAIGE TB,^D100
PUSHJ PP,PUTLST
CAIGE TB,^D1000
PUSHJ PP,PUTLST
PUSHJ PP,PUTDEC
MOVEI CH,","
PUSHJ PP,PUTLST
LDB TB,[POINT 7,W2,35] ;GET SOURCE CHAR POSITION
MOVEI CH,"0"
PUSHJ PP,PUTLST
CAIGE TB,^D10
PUSHJ PP,PUTLST
CAIGE TB,^D100
PUSHJ PP,PUTLST
PUSHJ PP,PUTDEC
MOVEI CH,"]"
PUSHJ PP,PUTLST
MOVEI CH,11 ;TAB
PUSHJ PP,PUTLST
HRRZ TD,TYPE ;GET CURRENT ITEM-TYPE
ANDI TD,1777
CAIN TD,EQUAL.
JRST T2
CAIN TD,GREAT.
JRST T2
CAIN TD,LESS.
JRST T2
CAIGE TD,765
TLNE W1,GWNOT
JRST T2
T.9: LDB TE,[POINT 15,W2,15]
ADD TE,NAMLOC##
T0: MOVE TA,[POINT 6,1(TE)]
HRRZI TB,36
T1: ILDB CH,TA
TRNN CH,60
JRST PTTYPX
ADDI CH,40
CAIN CH,":"
HRRZI CH,"-"
CAIN CH,";"
HRRZI CH,"."
PUSHJ PP,PUTLST
SOJG TB,T1
JRST PTTYPX
T2: HRRZI TE,.SPTYP
SUBI TD,765
JUMPGE TD,T2.1
CAMN TD,[EXP EQUAL.-765]
HRRZI TD,.EQ.-.SPTYP
CAMN TD,[EXP GREAT.-765]
HRRZI TD,.GRT.-.SPTYP
CAMN TD,[EXP LESS.-765]
HRRZI TD,.LES.-.SPTYP
CAIL TD,0
T2.1: CAILE TD,.LSTSP-.SPTYP-1
T3: HRRZI TD,UNKNN.-.SPTYP
ADD TE,TD
T2.5: MOVE TA,[POINT 7,(TE)]
HRRZI TC,5
T2.6: ILDB CH,TA
JUMPE CH,T2.7
PUSHJ PP,PUTLST
SOJG TC,T2.6
T2.7: CAIL TD,.SPEND-.SPTYP
CAIN TD,UNKNN.-.SPTYP
JRST PTTYPX
CAIL TD,.EQ.-.SPTYP
JRST PTTYPX
HRRZI CH,"."
PUSHJ PP,PUTLST
CAIN TD,.SPEND-.SPTYP
JRST PTTYPX
TLNN W1,GWLIT
TLNE W1,GWNOT
JRST T2.9
HRRZI CH,"="
PUSHJ PP,PUTLST
JRST T.9
T2.9: CAIL TD,.INTGR-.SPTYP
CAILE TD,.LITER-.SPTYP
JRST T2.12
HRRZ TA,W1
JUMPE TA,T2.11
LDB TB,[POINT 3,TA,20]
CAIE TB,CD.VAL
JRST T2.11
PUSHJ PP,LNKSET##
HRLI TA,440700
ILDB TB,TA
T2.95: JUMPLE TB,PTTYPX
HRRZI CH,"="
PUSHJ PP,PUTLST
T2.10: ILDB CH,TA
PUSHJ PP,PUTLST
SOJG TB,T2.10
JRST PTTYPX
T2.11: SKIPN LITVAL##
JRST PTTYPX
MOVE TA,[POINT 7,LITVAL]
LDB TB,[POINT 7,W1,17]
JRST T2.95
T2.12: SKIPN NAMWRD##
JRST PTTYPX
MOVE TA,[POINT 6,NAMWRD]
HRRZI TB,36
HRRZI CH,"="
PUSHJ PP,PUTLST
JRST T1
PTTYPX: MOVE NODE,(NODPTR) ;RESTORE (NODE)
JRST LCRLF## ;DON'T PUT A BLANK LINE OUT
; JUST END THE LINE.
;CHECK TO SEE IF LINE NUMBER IN RANGE
CHKTRC: CAML LN,TRCLN1## ;LESS THAN LOWER BOUND?
CAMLE LN,TRCLN2## ;GREATER THAN UPPER?
POP PP,(PP) ;YES, RETURN TO CALLER
POPJ PP,
;SPECIAL ITEMS TO PRINT
NOACT: SIXBIT /------/
.SPTYP: ASCII /,/
ASCII /;/
ASCII /(/
ASCII /)/
ASCII /./
ASCII /+/
ASCII /-/
ASCII "/"
ASCII /*/
ASCII /**/
.SPEND: ASCII /ENDIT/
ASCII /USERN/
ASCII /FILEN/
ASCII /MNEMO/
ASCII /SPECN/
ASCII /CONDI/
ASCII /EXTNA/
ASCII /PRONM/
UNKNN.: ASCII /?????/
ASCII /FIGCN/
.INTGR: ASCII /INTGR/
ASCII /NLIT/
.LITER: ASCII /LITER/
ASCII /INDNA/
ASCII /RECNA/
ASCII /GNAME/
ASCII /DATAN/
ASCII /RPNAM/
ASCII /CDNAM/
.EQ.: ASCII /=/
.GRT.: ASCII />/
.LES.: ASCII /</
.LSTSP==.
END