Trailing-Edge
-
PDP-10 Archives
-
decuslib10-05
-
43,50337/17/rtrace.mac
There are 2 other files named rtrace.mac in the archive. Click here to see a list.
COMMENT;::::::::::::::::::::::::::::::::::::::::::::::::::
AUTHOR: CLAES WIHLBORG
KIM WALDEN
UPDATED AT ACADIA UNIVERSITY FOR KA10
UPDATE: 1
PURPOSE:RTRACE PERFORMS THE TRACE OF COMPILED SIMULA
PROGRAMS AND OF THE RUN-TIME SYSTEM. IT MUST
BE LOADED LAST IN THE LOW SEGMENT. THE RTS
MUST BE A ONE-PASS VERSION.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
SEARCH SIMMAC
SALL
RTITLE RTRACE
MACINIT
EXTERN .JBUUO,.JB41,.JBSA,.JBFF,.JBDDT
LOC 124
TRACE
RELOC 0
DEFINE X(F,L,T)<
IFB<L>,<<IX'T-IXCT>B8+I'T>
IFNB<L>,<REPEAT L+1-F,<<IX'T-IXCT>B8+I'T>>
>
TAB:
X 0,0,SKIP
X 1,37,UUO
X 40,46,SKIP
X 47,47,CALLI
X 50,107,SKIP
X 110,251,ORD
X 252,255,JUMP
X 256,,XCT
X 257,,ORD
X 260,,PUSHJ
X 261,262,ORD
X 263,,POPJ
X 264,,JSR
X 265,,JSP
X 266,,JSA
X 267,,JRA
X 270,277,ORD
X 300,317,SKIP
X 320,327,JUMP
X 330,337,SKIP
X 340,347,JUMP
X 350,357,SKIP
X 360,367,JUMP
X 370,377,SKIP
X 400,577,ORD
X 600,677,SKIP
X 700,777,SKIP
TRACE:
DMOVEM
OUTSTR [ASCIZ/
TRACE:/]
LOOP
INCHWL X1
AS
CAIGE X1," "
GOTO TRUE
SA
IF
CAIE X1,"L"
GOTO FALSE
THEN ;TRACE OF LOWSEG
LI X2,140
SKIPE .JBDDT
LI X2,4000
LI X3,TAB
LI X4,TAB
SUB X4,X2
ELSE
IF
CAIN X1,"H"
GOTO FALSE
THEN
OUTSTR [ASCIZ/ANSWER L OR H/]
GOTO TRACE
FI
;TRACE OF HI-SEG
LI X2,400010
LI X3,424000
LI X4,23770
FI
MOVNI X5,403(X4)
ST X5,YTRLEN
LI X5,YTRTAB+1(X4)
HRLM X5,.JBSA
ST X5,.JBFF
CORE X5,
HALT .
SETZM YTRACC
L [YTRACC,,YTRACC+1]
BLT YTRTAB+1(X4)
IF
CAIE X1,"H"
GOTO FALSE
THEN
OPEN QCHTRC,[16
SIXBIT/DSK/
0]
HALT
;***AUBEG
;PARENTHESISE LD ADDRESS ARGUMENT
LD 6,<[SIXBIT/TRACE5BIN/]>
;***AUEND
SETZB 10,11
LOOKUP QCHTRC,6
GOTO FALSE
HRRI 11,YTRACC-1
LI 12,0
IN QCHTRC,11
SKIPA
HALT
CLOSE QCHTRC,
RELEASE QCHTRC,
ELSE
HRLI X2,331100
HRLI X3,331100
STD X2,YTRLOW
FI
LI X3,YTRTAB
SUB X3,X2
HRLI X3,1
ST X3,YTRTP
INCHWL X1
INCHWL X1
L X1,.JBSA
HRLI X1,331100
ST X1,YTRLC
GOTO NEXTIA
IXORD:
IORD: L 1,YTRSAV+1
XCT @YTRLC
NEXTI: ST 1,YTRSAV+1
NEXTIS: AOS 1,YTRLC
NEXTIA: AOS YTRACC
IF
CAMGE 1,YTRLOW
GOTO FALSE
CAMG 1,YTRHGH
THEN AOS @YTRTP
FI
L 1,YTRSAV+1
LDB 1,YTRLC
GOTO @TAB(1)
IXSKIP:
ISKIP: L 1,YTRSAV+1
XCT @YTRLC
GOTO NEXTI
AOS YTRLC
GOTO NEXTI
IJUMP:
L 1,YTRSAV+1
L 1,@YTRLC
ST 1,YTRINS
IXJUMP: L 1,YTRSAV+1
LI 1,@YTRINS
ST 1,YTRJLC
L 1,YTRINS
HRRI 1,IJUMPA
TLZ 1,37
ST 1,YTRINS
L 1,YTRSAV+1
XCT YTRINS
ST 1,YTRSAV+1
GOTO NEXTIS
IJUMPA: ST 1,YTRSAV+1
L 1,YTRJLC
HRRM 1,YTRLC
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
TRNN 2,400K
TRO 3,'4'
ENTER QCHTRC,3
HALT .
;***AUBEG
;PARENTHESISE LITERAL FOR KA10 LD MACRO
LD 6,<[YTRACC-1
0]>
;***AUEND
HRL 6,YTRLEN
OUT QCHTRC,6
SKIPA
HALT
CLOSE QCHTRC,
RELEASE QCHTRC,
L 1,YTRSAV+1
GOTO @YTRLC
LIT
YTRLEN:0
YTRTP:0
YTRLC:0
YTRJLC:0
YTRINS:0
YTRSAV:0
0
YTRACC:0
YTRLOW:0
YTRHGH:0
YTRSIM:BLOCK 400
YTRTAB:
END