Trailing-Edge
-
PDP-10 Archives
-
BB-L014E-BM
-
autopatch/cmngen.c04
There are no other files named cmngen.c04 in the archive.
INS 18/1 ;04C1
;V12B****************
;JSM/DN 16-OCT-81 [1300] Fatal Diag for subprogram if REDEFINED item
; is referenced in USING clause but original item
; is referenced elsewhere.
;JSM 18-SEP-81 [1307] Comp-3 Literal 0 always generated unsigned
; Make signed if receiving operand signed.
REP 34/14 ;04C2
; OCT 17
;(COMP-3 ZERO PIC S9(18).)
C3ZRO.::
SKIPE EACC, C3ZERO## ;HAS IT ALREADY BEEN GENERATED?
POPJ PP, ;YES, RETURN.
WIT
; OCT 17 ;[1307] ASSUMES UNSIGNED, SIGNED SHOULD BE OCT 14
;(COMP-3 ZERO PIC 9(18) OR S9(18).) ;[1307]
C3ZRO.::
;[1307] GENERATE LITERAL SEPARATELY FOR EACH RECEIVING OPERAND, AS THERE
;[1307] MAY BE A MIX OF SIGNED AND UNSIGNED RECEIVING OPERANDS.
;[D1307] SKIPE EACC, C3ZERO## ;HAS IT ALREADY BEEN GENERATED?
;[D1307] POPJ PP, ;YES, RETURN.
TSWF FBSIGN ;[1307] If receiving operand is signed
PUSH PP, [XWD 14,C3ZERO##] ;[1307] Make Literal signed
TSWT FBSIGN ;[1307] Else make it unsigned
REP 7/116 ;04C3
JUMPE TB,SILG7C ;NO
SILG7A: MOVE CH,[AD+ASINC,,AS.MSC]
PUSHJ PP,PUT.XA ;"ADD AC,"
LDB TB,DA.ARG## ;WHERE IS THE ARG?
JUMPN TB,SILG7B ; THERE IT IS!
WIT
;[D1300] JUMPE TB,SILG7C ;NO
MOVEM TA,HLDBRO## ;[1300] INITIALIZE TEMP BROTHER PTR WITH SELF
JUMPN TB,SILG7A ;[1300] YES, REF'D BY ENTRY OR PD USING
PUSH PP,TA ;[1300] SAVE PTR TO CURRENT ITEM AGAIN
SILG7D: ;[1300]
LDB TA,DA.BRO## ;[1300] SEE IF IT HAS A BROTHER
JUMPE TA,SILG7E ;[1300] NO, GIVE UP
PUSHJ PP,LNKSET ;[1300] GET POINTER TO IT
LDB TB,DA.RDF## ;[1300] IS IT A REDEFINES?
JUMPE TB,SILG7D ;[1300] NO, TRY TO GET NEXT BROTHER
LDB TB,DA.ARG## ;[1300] IS ITS INDEX LOC SET UP?
JUMPE TB,SILG7D ;[1300] NO, TRY TO GET NEXT BROTHER
MOVEM TA,HLDBRO## ;[1300] YES, PUT IN TEMP BROTHER PTR
POP PP,TA ;[1300] RESTORE PTR TO ORIG ITEM
;[1300] AND CONTINUE ON TO GENERATE INSTR
SILG7A: MOVE CH,[AD+ASINC,,AS.MSC]
PUSHJ PP,PUT.XA ;"ADD AC,"
;[1300] HERE WE USE THE TEMP BROTHER PTR TO SEE IF INDEX LOC IS SET UP
PUSH PP,TA ;[1300] SAVE PTR TO CURRENT ITEM
MOVE TA,HLDBRO## ;[1300] GET PTR TO BROTHER (OR MAYBE SELF)
;[1300] THEN WE GET HIS INDEX LOC. IF THIS IS SET UP WE USE IT TO GENERATRATE
;[1300] THE SECOND OPERAND FOR THE INSTRUCTION. IF IT IS NOT SET UP WE
;[1300] FALL THRU THE CODE AND PUT A 0 IN FOR THE SECOND OPERAND.
LDB TB,DA.ARG## ;WHERE IS THE ARG?
POP PP,TA ;[1300] RESTORE PTR TO CURRENT ITEM
JUMPN TB,SILG7B ; THERE IT IS! ;[1300] GENUINE ENTHUSIASM
INS 23/116 ;04C4
SILG7E: POP PP,TA ;[1300] NO VALID BRO, SO RESTORE ORIG PTR
;[1300] AND FALL THRU TO REPORT ERROR.
SUM 10947