1 TITLE UUO HANDLER FOR MUDDLE AND HYDRA
7 ;XBLT=123000,,[020000,,0]
9 IFE ITS,.INSRT STENEX >
11 ;GLOBALS FOR THIS PROGRAM
13 .GLOBAL BACKTR,PRINT,PDLBUF,TPGROW,SPECSTO,TIMOUT,AGC,VECBOT,VECTOP
14 .GLOBAL BCKTRK,TPOVFL,.MONWR,.MONRD,.MONEX,MAKACT,IGVAL,ILVAL,BFRAME
15 .GLOBAL FLGSET,QMPOPJ,SAVM,STBL,FMPOPJ,PVSTOR,SPSTOR,POPUNW,RMCALL
16 .GLOBAL PURTOP,PURBOT,PLOAD,PURVEC,STOSTR,MSGTYP,UUOH,ILLUUO,RSTACK,IBLOCK
17 .GLOBAL NFPOPJ,NSPOPJ,MULTSG,MLTUUP
18 .GLOBAL SHRRM,SHRLM,SMOVEM,SSETZM,SXBLT,SHLRZ
19 .GLOBAL C%11,C%22,C%33,C%44,C%55,C%66,C%0,C%1,C%2,C%3,C%M1,C%M2,C%M10
20 .GLOBAL C%M20,C%M30,C%M40,C%M60
22 ;SETUP UUO DISPATCH TABLE HERE
29 IRP UUOS,,[[DP,DODP],[.MCALL,DMCALL],[.ACALL,DACALL],[.ECALL,DECALL],[.SAVAC,DSAVAC]
30 [.FATAL,DFATAL],[.ERRUU,DOERR],[.POPUN,DPOPUN],[.LSAVA,DLSAVA]
31 [SHRRM,DHRRM],[SHRLM,DHRLM],[SXBLT,DXBLT],[SMOVEM,DMOVEM],[SHLRZ,DHLRZ],[SSETZM,DSETZM],[SMOVE,DMOVE]]
41 ;SINCE CHECKING HAPPENS IN UUOH, NO LONGER NEED TABLE FULL OF ILLUUOS
42 ;REPEAT 100-UUFOO,[ILLUUO
60 ALLUUO: LDB C,[331100,,UUOLOC] ;GET OPCODE
63 CAIA ;SKIP IF ILLEGAL UUO
64 JRST @UUOTBL(C) ;DISPATCH TO SUITABLE HANDLER
66 .SUSET [.RJPC,,SAVJPC]
69 ILLUUO: FATAL ILLEGAL UUO
70 ; THIS WILL LEAVE .JPC FOR DEBUGGING AND SUCH
74 SAVJPC: 0 ; SAVE JPC IN CASE OF LOSS
75 SAVEC: 0 ; USED TO SAVE WORKING AC
78 MLTUUP: 0 ; HOLDS UUO (SWAPPED SORT OF)
80 MLTEA: 0 ; EFF ADDR OF UUO INSTRUCTION
81 MLTUUH: FSEG,,MLTUOP ; RUN IN "FSEG"
86 ;SEPARATION OF PURE FROM IMPURE CODE HERE
88 ;UUOPUR: MOVEM C,SAVEC ; SAVE AC
89 ; LDB C,[330900,,UUOLOC]
90 ; JRST @UUOTBL(C) ;DISPATCH BASED ON THE UUO
92 ; HANDLER FOR UUOS IN MULTI SEG MODE
96 MOVEM C,UUOH ; SO MANY THINGS WIN IMMEDIATE
100 MOVEM C,UUOLOC ; GET INS CODE
111 SETZB D,R ; FLAG NOT ENTRY CALL
112 LDB C,[270400,,UUOLOC] ; GET AC FIELD OF UUO
113 COMCAL: LSH C,1 ; TIMES 2
114 MOVN AB,C ; GET NEGATED # OF ARGS
115 HRLI C,(C) ; TO BOTH SIDES
116 SUBM TP,C ; NOW HAVE TP TO SAVE
117 MOVEM C,TPSAV(TB) ; SAVE IT
118 MOVSI AB,(AB) ; BUILD THE AB POINTER
119 HRRI AB,1(C) ; POINT TO ARGS
120 HRRZ C,UUOH ; GET PC OF CALL
121 CAIL C,HIBOT ; SKIP IF NOT IN GC SPACE
123 SUBI C,(M) ; RELATIVIZE THE PC
124 TLOA C,400000+M ; FOR RETURNER TO WIN
130 MOVEM SP,SPSAV(TB) ; SAVE BINDING GOODIE
131 MOVSI C,TENTRY ; SET UP ENTRY WORD
132 HRR C,UUOLOC ; POINT TO CALLED SR
133 ADD TP,[FRAMLN,,FRAMLN] ; ALLOCATE NEW FRAME
135 CALDON: MOVEM C,FSAV+1(TP) ; CLOBBER THE FRAME
136 MOVEM TB,OTBSAV+1(TP)
137 MOVEM AB,ABSAV+1(TP) ; FRAME BUILT
139 HRRI TB,(TP) ; SETUP NEW TB
141 SETZB M,SAVM ; ZERO M AND SAVM FOR GC WINNAGE
142 CAILE C,HIBOT ; SKIP IF RSUBR
144 GETYP A,(C) ; GET CONTENTS OF SLOT
145 JUMPN D,EVCALL ; EVAL CALLING ENTRY ?
146 CAIE A,TRSUBR ; RSUBR CALLING RSUBR ?
148 MOVE R,(C)+1 ; YES, SETUP R
149 CALLR0: HRRM R,FSAV+1(TB) ; FIXUP THE PROPER FSAV
151 CALLR1: SKIPL M,(R)+1 ; SETUP M
152 JRST SETUPM ; JUMP IF A PURE RSUBR IN QUESTION
153 IFN ITS, AOBJP TB,.+1 ; GO TO CALLED RSUBR
157 MCHK1: INTGO ; CHECK FOR INTERRUPTS
162 HRLI TB,400000 ; KEEP TB NEGATIVE
166 IFN ITS, AOBJP TB,.+1 ; GO TO CALLED SUBR
167 IFE ITS, AOBJP TB,MCHK3
168 MCHK4: INTGO ; CHECK FOR INTERRUPTS
169 IFE ITS, SKIPN MULTSG
170 JRST @C ; WILL DO "RIGHT THING IN MULTI SEG"
177 HRLI TB,400000 ; KEEP TB NEGATIVE
183 ; HERE TO HANDLE A PURE RSUBR (LOAD IF PUNTED OR OTHERWISE FLUSHED)
185 SETUPM: MOVEI C,0 ; OFFSET (FOR MAIN ENTRIES)
186 STUPM1: MOVEI D,(M) ; GET OFFSET INTO CODE
187 HLRS M ; GET VECTOR OFFSET IN BOTH HALVES
188 ADD M,PURVEC+1 ; GET IT
190 FATAL LOSING PURE RSUBR POINTER
191 HLLM TB,2(M) ; MARK FOR LRU ALGORITHM
192 SKIPN M,1(M) ; POINT TO CORE IF LOADED
193 AOJA TB,STUPM2 ; GO LOAD IT
194 STUPM3: ADDI M,(D) ; POINT TO REAL THING
197 ADD C,M ; POINT TO START PC
199 TLZ C,777400 ; KILL COUNT
203 IFN ITS, JRST @C ; GO TO IT
207 MOVEI B,0 ; AVOID FLAG MUNG
208 XJRST B ; EXTENDED JRST HACK
211 HRLI TB,400000 ; KEEP TB NEGATIVE
215 STUPM2: HLRZ A,1(R) ; SET UP TO CALL LOADER
218 PUSHJ P,PLOAD ; LOAD IT
222 MOVE M,B ; GET LOCATION
225 RCHECK: CAIN A,TPCODE ; PURE RSUBR?
227 CAIE A,TCODE ; EVALUATOR CALLING RSUBR ?
229 MOVS R,(C) ; YES, SETUP R
231 JRST CALLR1 ; GO FINISH THE RSUBR CALL
234 SCHECK: CAIE A,TSUBR ; RSUBR CALLING SUBR AS REFERENCE ?
236 SKIPA C,(C)+1 ; SKIP AND GET ROUTINE'S ADDRESS
238 HRRM C,FSAV+1(TB) ; FIXUP THE PROPER FSAV
239 IFE ITS, SKIPN MULTSG
240 JRST CALLS ; GO FINISH THE SUBR CALL
242 HRLI C,FSEG ; FOR SEG #1
245 ECHECK: CAIE A,TENTER ; SKIP IF SUB ENTRY OF RSUBR
246 JRST ACHECK ; COULD BE EVAL CALLING ONE
247 MOVE C,1(C) ; POINT TO SUB ENTRY BLOCK
248 ECHCK3: GETYP A,(C) ; SEE IF LINKED TO ITS MAIN ENTRY
253 ; CHECK IF CAN LINK ATOM
256 JRST BENTRY ; LOSER , COMPLAIN
257 ECHCK4: MOVE B,1(C) ; GET ATOM
260 PUSHJ P,IGVAL ; TRY GLOBAL VALUE
266 CAIE 0,TRSUBR ; IS IT A WINNER
268 CAMGE C,PURTOP ; DONT TRY TO SMASH PURE
271 HLLM A,(C) ; FIXUP LINKAGE
275 EVCALL: CAIN A,TATOM ; EVAL CALLING ENTRY?
276 JRST ECHCK4 ; COULD BE MUST FIXUP
277 CAIE A,TRSUBR ; YES THIS IS ONE
280 ECHCK2: MOVE R,B ; SET UP R
281 HRRM C,FSAV+1(TB) ; SET POINTER INTO FRAME
282 HRRZ C,2(C) ; FIND OFFSET INTO SAME
283 SKIPL M,1(R) ; POINT TO START OF RSUBR
284 JRST STUPM1 ; JUMP IF A LOSER
286 IFE ITS, SKIPN MULTSG
287 JRST CALLS ; GO TO SR
292 ACHECK: CAIE A,TATOM ; RSUBR CALLING THROUGH REFERENCE ATOM ?
293 JRST DOAPP3 ; TRY APPLYING IT
297 HRRZ C,UUOLOC ; REGOBBLE POINTER TO SLOT
301 SAVEIT: CAIE 0,TRSUBR
307 JRST BADVAL ; SOMETHING STRANGE
308 SAVEI1: CAMGE C,PURTOP ; SKIP IF PURE RSUBR VECTOR (NEVER LINKED)
311 MOVEM A,(C) ; CLOBBER NEW VALUE
314 JRST ENTRIT ; HACK ENTRY TO SUB RSUBR
316 JRST CALLR0 ; GO FINISH THE RSUBR CALL
321 SUBRIT: CAMGE C,PURBOT
326 HRRM B,FSAV+1(TB) ; FIXUP THE PROPER FSAV
328 IFN ITS, JRST CALLS ; GO FINISH THE SUBR CALL
337 SKIPA D,EQUOTE UNBOUND-VARIABLE
341 AOBJP TB,.+1 ; MAKE TB A LIGIT FRAME PNTR
346 MCHK6: MOVEI E,CALLER
347 HRRM E,FSAV(TB) ; SET A WINNING FSAV
348 HRRZ C,UUOLOC ; REGOBBLE POINTER TO SLOT
355 PUSH TP,IMQUOTE CALLER
361 BENTRY: MOVE D,EQUOTE BAD-ENTRY-BLOCK
367 HRLI TB,400000 ; KEEP TB NEGATIVE
372 ;HANDLER FOR CALL WHERE SPECIFIES NUMBER OF ARGS
375 LDB C,[270400,,UUOLOC] ; GOBBLE THE AC LOCN INTO C
376 EXCH C,SAVEC ; C TO SAVE LOC RESTORE C
377 MOVE C,@SAVEC ; C NOW HAS NUMBER OF ARGS
378 MOVEI D,0 ; FLAG NOT E CALL
379 JRST COMCAL ; JOIN MCALL
381 ; CALL TO ENTRY FROM EVAL (LIKE ACALL)
383 DECALL: LDB C,[270400,,UUOLOC] ; GET NAME OF AC
384 EXCH C,SAVEC ; STORE NAME
385 MOVE C,@SAVEC ; C NOW HAS NUM OF ARGS
386 MOVEI D,1 ; FLAG THIS
389 ;HANDLE OVERFLOW IN THE TP
391 TPLOSE: PUSHJ P,TPOVFL
394 ; RSUBR HAS POSSIBLY BEEN REPLACED BY A FUNCTION OR WHATEVER, DO AN APPLY
396 DOAPPL: PUSH TP,A ; PUSH THE THING TO APPLY
399 DOAPP2: JUMPGE AB,DOAPP1 ; ARGS DONE
406 DOAPP1: ACALL A,APPLY ; APPLY THE LOSER
409 DOAPP3: MOVE A,(C) ; GET VAL
411 JRST BADVAL ; GET SETUP FOR APPLY CALL
413 ; ENTRY TO BUILD A FRAME (USED BY SOME COMPILED PROG/REPEAT)
416 HRLI A,400000+M ; RELATIVIZE PC
417 MOVEM A,PCSAV(TB) ; CLOBBER PC IN
418 MOVEM TP,TPSAV(TB) ; SAVE STATE
421 ADD TP,[FRAMLN,,FRAMLN]
423 PUSHJ TPOVFL ; HACK BLOWN PDL
424 MOVSI A,TCBLK ; FUNNY FRAME
426 MOVEM A,FSAV+1(TP) ; CLOBBER
427 MOVEM TB,OTBSAV+1(TP)
429 POP P,A ; RET ADDR TO A
432 IFN ITS, AOBJN TB,.+1
433 IFE ITS, AOBJP TB,.+2
439 HRLI TB,400000 ; KEEP TB NEGATIVE
443 \f;SUBROUTINE TERMINATION CODE (NOT A UUO BUT HERE FOR COMPLETENENSS)
446 CNTIN1: HRRZS C,OTBSAV(TB) ; RESTORE BASE
448 CONTIN: MOVE TP,TPSAV(TB) ; START HERE FOR FUNNY RESTART
451 CAME SP,SPSAV(TB) ; ANY RESTORATION NEEDED
452 PUSHJ P,SPECSTO ; YES, GO UNRAVEL THE WORLDS BINDINGS
453 MOVE AB,ABSAV(TB) ; AND GET OLD ARG POINTER
454 HRRZ C,FSAV(TB) ; CHECK FOR RSUBR
455 MOVEI M,0 ; UNSETUP M FOR GC WINNAGE
456 CAILE C,HIBOT ; SKIP IF ANY FLAVOR OF RSUBR
457 IFN ITS, JRST @PCSAV(TB) ; AND RETURN
459 GETYP 0,(C) ; RETURN TO MAIN OR SUB ENTRY?
466 SKIPL M,1(R) ; GET LOC OF REAL SUBR
469 ;HERE TO RETURN TO NBIN
471 RETNBI: HLRZ 0,PCSAV(TB) ; GET FUNNY STUFF
477 FINIS1: CAIE 0,TRSUBR
478 JRST FINISA ; MAY HAVE BEEN PUT BACK TO ATOM
480 FINIS9: SKIPGE M,1(R)
483 FINIS2: MOVEI C,(M) ; COMPUTE REAL M FOR PURE RSUBR
486 SKIPN M,1(M) ; SKIP IF LOADED
488 ADDI M,(C) ; POINT TO SUB PART
489 PCREST: HLRZ 0,PCSAV(TB)
490 IFN ITS, JUMPN @PCSAV(TB)
506 IFN ITS, JRST @PCSAV(TB)
518 HLRZ A,1(R) ; RELOAD IT
533 MOVE B,1(C) ; GET ATOM
534 PUSHJ P,IGVAL ; GET VAL
540 CAMLE C,PURTOP ; SKIP IF CAN LINK UP
549 BADENT: ERRUUO EQUOTE RSUBR-ENTRY-UNLINKED
552 PCANT: ERRUUO EQUOTE PURE-LOAD-FAILURE
555 BCKTR1: PUSH TP,A ; SAVE VALUE TO BE RETURNED
556 PUSH TP,B ; SAVE FRAME ON PP
563 ; SUBR TO ENABLE AND DISABLE LINKING OF RSUBRS AT RUN TIME
565 MFUNCTION %RLINK,SUBR,[RSUBR-LINK]
572 ;HANDLER FOR DEBUGGING CALL TO PRINT
616 DQCALL: GETYP C,@40 ; SEE IF THIS GUY IS A QRSUBR OR QENT
622 ; NOT A QENT OR QRSUBR, MAYBE AN ATOM THAT LINKS TO ONE
625 CAIE C,TATOM ; SKIP IF ATOM
626 JRST DMCALL ; PRETEND TO BE AN MCALL
628 MOVE C,UUOH ; GET PC OF CALL
629 SUBI C,(M) ; RELATIVIZE
631 LDB C,[270400,,40] ; GET # OF ARGS
633 HRRZ C,40 ; POINT TO RSUBR SLOT
634 MOVE B,1(C) ; GET ATOM
635 SUBI C,(R) ; RELATIVIZE IT
637 ADD C,R ; C IS NOW A VECTOR POINTER
642 PUSHJ P,IGVAL ; SEE IF IT HAS A VALUE
643 GETYP 0,A ; IS IT A WINNER
647 PUSHJ P,ILVAL ; LOCAL?
650 JRST DQCAL2 ; MAY BE A WINNER
653 PUSH TP,EQUOTE UNBOUND-VARIABLE
657 PUSH TP,IMQUOTE CALLER
660 DQCAL2: PUSH TP,$TENTE ; IN CASE RSUBR ENTRY
662 CAIN 0,TRSUBR ; RSUBR?
663 JRST DQRSB ; YES, WIN
667 DQMCAL: HRRZ C,-6(TP) ; PRETEND WE WERE AN MCALL
675 JRST DMCALL ; FALL INTO MCALL CODE
677 DQENT: MOVEM B,(TP) ; SAVE IT
678 GETYP 0,(B) ; LINKED UP?
682 DQENT2: CAIE 0,TATOM ; BETTER BE ATOM
684 PUSHJ P,IGVAL ; TRY TO LINK IT UP
693 DQRSB: PUSH TP,$TRSUBR
700 PUSHJ P,DQCALQ ; MAP ONE IN
702 MOVEI E,0 ; GET OFFSET
705 HLRE B,M ; FIND END OF CODE VECTOR
709 HLRZ A,-1(B) ; GET LENGTH OF ENTRY VECTOR
710 HRRZ C,-1(B) ; GET LENGTH OF DDT SYMBOL TABLE
711 ADDI C,(A) ; TOTAL LENGTH OF RANDOM CRUFT AT THE END OF CODE
712 SUBI B,1(C) ; POINT TO FIRST ELEMENT IN ENTRY VECTOR
715 CAIL D,(E) ; IN RANGE?
721 SL1: HLRE D,(B) ; GET NEXT
729 HRRZ C,(B) ; GET OFFSET
730 MOVE R,(TP) ; SETUP R
731 SKIPN B,-2(TP) ; SKIP IF RSUBR ENTRY
741 DQMUNG: HRRZ D,-6(TP) ; GET CALLING RVECTOR
742 CAILE D,@PURTOP ; SMASHABLE?
743 JRST DQLOSS ; NO LOSE
757 MOVE B,1(E) ; GET RSUBR ENTRY
772 MOVEM A,(C) ; SAVE IT
774 HRRM B,FSAV(TB) ; FOR FUTURE MCALLS
777 SUBI C,(M) ; RELATIVIZE
779 SKIPL M,1(R) ; MAYBE LINK UP?
785 DQCALQ: HLRS M ; GET VECTOR OFFSET IN BOTH HALVES
786 ADD M,PURVEC+1 ; GET IT
788 FATAL LOSING PURE RSUBR POINTER
792 DQCLP1: PUSH TP,$TRSUBR
795 HLRZ A,1(B) ; SET UP TO CALL LOADER
796 PUSHJ P,PLOAD ; LOAD IT
799 MOVE M,B ; GET LOCATION
813 PUSHJ P,IBLOCK ; GET BLOCK
814 MOVEI A,.VECT.+TRSUBR
821 BLT A,-101(C) ; COPY IT
822 MOVEM B,RSTACK+1(PVP)
840 MOVE R,(D) ; GET R OR WHATEVER
843 CAIN 0,TRSUBR ; RSUBR?
845 SKIPL M,1(R) ; RSUBR IN CORE ETC
853 SKIPE M,1(M) ; SKIP IF LOADED
857 HLRZ A,1(R) ; RELOAD IT
866 ; THIS IS A UUO TO CALL ERROR WITH ONE ARGUMENT
875 ; ROUTINE TO DO AN RCALL FOR SUBRIFIED GOODIES
877 RMCALL: MOVEM M,SAVM ; SAVE M
887 ; ROUTINE USED BY COMPILED CODE TO SAVE ACS CALL AN INTERRUPT AND RESTORE ACS.
888 ; THIS UUO TAKES A LOCATION FROM WHICH TO FIND A DESCRIPTION OF HOW ACS ARE TO
891 ; LOC POINTS TO A BLOCK WHICH CAN BE ONE OR MORE WORDS LONG DEPENDING ON BOTH
892 ; THE NUMBER OF SCRATCH AC'S (CURRENTLY 5) AND THE NUMBER OF AC'S CONTAINING
894 ; THE FIRST PART OF THE BLOCK CONTAINS THE AC DECRIPTIONS. EACH AC IS DESCRIBED
895 ; BY A SIX BIT FIELD WITH THE EXCEPTION OF AC'S CONTAINING TEMPLATES.
896 ; THE SIX BIT FIELD CAN BE
898 ; 0 EITHER A TYPE WORD OR NOTHING
899 ; 1 -> 8 THE NUMBER OF THE AC CONTAINING THE TYPE
900 ; 9 -> 62 THE SAT OF THE THING CONTAINED IN THE AC (+ 8)
901 ; 63 A TEMPLATE LOOK AT THE BLOCK AFTER TO FIND A POINTER TO THE TYPE WORD
903 ; TEMPLATE DESCRIPTIONS ARE FOUND AFTER THE AC DESCRIPTION BLOCK. THESE ARE FOUND
904 ; IN SUCESSIVE WORDS CONTAINING POINTERS INTO THE R VECTOR
912 DLSAVA: PUSH P,[SETZ NOACS]
916 DSAVAC: PUSH P,[SETZ ONOACS]
919 IFN ITS, MOVE 0,UUOH ; GET PC
926 PUSH P,UUOLOC ; SAVE UUO
930 SUBI 0,(M) ; M IS BASE REG
931 IFN ITS, TLO 0,M ; INDEX IT OFF M
935 HRLI 0,<<M>_12.> ; MAKE GLOBAL INDEX
937 MOVEM 0,-1(P) ; AND RESTORE TO STACK
938 ; MOVE 0,UUOLOC ; GET REL POINTER TO TBL - REDUNDANT
939 ; MOVEM 0,(P) ; AND SAVE IT - REDUNDANT PTR ALREADY PUSHED
943 HRRZ 0,-3(P) ; NUMBER OF ACS
944 ; MOVE A,[440620,,UUOLOC] ; BYTE POINTER INDIRECTED TO 40
946 MOVE A,UUOLOC ; GET THE INSTRUCTION
947 HRLI A,440640 ; OR IN THE BYTE POINTER
950 MOVSI A,440640 ; OR IN THE BYTE POINTER
956 MOVE D,-2(P) ; POINTER TO TEMPLATE BLOCK
960 ADD D,UUOLOC ; GET TO BLOCK
973 LOPSAV: ILDB E,A ; GET A DESCRIPTOR
974 JUMPE E,NOAC1 ; ZERO==TYPE WORD
975 CAIE E,77 ; IF 63. THEN TEMPLATE HANDLE SPECIALLY
976 JRST NOTEM ; NOT A TEMPLATE
977 PUSH TP,@(D) ; IT IS A TEMPLATE POINTER SO PUSH TYPE
979 LOPPUS: PUSH TP,ACSAV-1(C) ; PUSH AC
981 SOJG 0,LOPSAV ; LOOP BACK
984 JSR LCKINT ; GO INTERRUPT
986 ; BLT 0,ACSAV+NOACS-1 ; UNNECESSARY SINCE WILL BE MUNGED ANYWAY
987 HRRZ B,-3(P) ; NUMBER OF ACS
989 LOPPOP: POP TP,ACSAV-1(B)
992 LOPFOO: SOJG B,LOPPOP
993 ; MOVEI 0,ACSAV-1 ; THIS CAUSES BLT TO GO TOO FAR
996 BLT 0,@-3(P) ; RESTORE AC'S
998 SUB P,C%44 ; RETURN ADDRESS, (M)
1001 NOTEM: CAILE E,8. ; SKIP IF AC IS TO BE PUSHED
1003 IFE ITS, TLO E,400000 ; MAKE LOCAL INDEX
1005 JRST LOPPUS ; FINISH PUSHING
1006 NOAC: SUBI E,8 ; COMPENSATE FOR ADDED AMOUNT
1008 IFE ITS, TLO E,400000 ; MAKE LOCAL INDEX
1010 HLRE F,E ; GET NEGATIVE
1012 HRLZ E,(E) ; GET TYPE CODE
1013 TLZ E,400000+<0,,<-1>#<TYPMSK>> ; KILL SIGN BIT
1014 PUSH TP,E ; PUSH TYPE
1015 JRST LOPPUS ; FINISH PUSHING
1025 NFPOPJ: MOVE TP,FRM ; CLEAR OFF FRM
1030 ; THIS WEIRD PIECE OF CODE IS USED TO DO AN MPOPJ IN SUBRIFIED CODE THAT
1031 ; DOES A SKIP/NON SKIP RETURN.
1040 DPOPUN: PUSHJ P,POPUNW
1043 ; HERE FOR MULTI SEG SIMULATION STUFF
1045 DMOVE: MOVSI C,(MOVE)
1047 DHRRM: MOVSI C,(HRRM)
1049 DHRLM: MOVSI C,(HRLM)
1051 DMOVEM: MOVSI C,(MOVEM)
1053 DHLRZ: MOVSI C,(HLRZ)
1055 DSETZM: MOVSI C,(SETZM)
1057 DXBLT: MOVE C,[123000,,[020000,,]]
1060 MOVE A,UUOH ; GET LOC OF INS
1078 SAVM: 0 ; SAVED M FOR SUBRIFY HACKERS