Trailing-Edge
-
PDP-10 Archives
-
decuslib20-03
-
decus/20-0091/forsys.dat
There is 1 other file named forsys.dat in the archive. Click here to see a list.
( FORTH LOADER BLOCK) DECIMAL 2 LOAD 3 LOAD 4 LOAD 5 LOAD 6 LOAD 7 LOAD 8 LOAD 9 LOAD 10 LOAD 12 LOAD 14 LOAD 20 LOAD 23 LOAD 11 CONSTANT EDIT 40 CONSTANT FPMATH 33 CONSTANT VT52 51 CONSTANT VLB 48 CONSTANT PDP11 65 CONSTANT STRINGS 71 CONSTANT XED 76 CONSTANT TRANSFER 44 CONSTANT FFTPACKAGE : LOGOUT 26 LOAD ; ( IMMEDIATE LOGOUT!) WOPEN ( REMOVE FOR READ-ONLY SYSTEM) : <ok> SAVE ; ;S ( ASSEMBLER 1) OCTAL 250 CPU EXCH, 251 CPU BLT, 200 CPU MOVE, 210 CPU MOVN, 204 CPU MOVS, 214 CPU MOVM, 500 CPU HLL, 544 CPU HLR, 540 CPU HRR, 504 CPU HRL, 270 CPU ADD, 274 CPU SUB, 220 CPU IMUL, 224 CPU MUL, 230 CPU IDIV, 234 CPU DIV, 400 CPU SETZ, 474 CPU SETO, 424 CPU SETA, 414 CPU SETM, 404 CPU AND, 434 CPU IOR, 430 CPU XOR, 444 CPU EQV, 133 CPU IBP, 135 CPU LDB, 137 CPU DPB, 134 CPU ILDB, 136 CPU IDPB, 264 CPU JSR, 265 CPU JSP, 254 CPU JRST, 266 CPU JSA, 267 CPU JRA, 255 CPU JFCL, 256 CPU XCT, 243 CPU JFFO, 261 CPU PUSH, 262 CPU POP, 260 CPU PUSHJ, 263 CPU POPJ, 240 CPU ASH, 244 CPU ASHC, 241 CPU ROT, 245 CPU ROTC, 242 CPU LSH, 246 CPU LSHC, 252 CPU ABJP, 253 CPU ABJN, 300 CPU CAI, 310 CPU CAM, 320 CPU JUMP, 330 CPU SKIP, 340 CPU AOJ, 360 CPU SOJ, 350 CPU AOS, 370 CPU SOS, 601 CPU TLN, 600 CPU TRN, 621 CPU TLZ, : J, 0 JRST, ; DECIMAL ;S ( ASSEMBLER 2) OCTAL 620 CPU TRZ, 641 CPU TLC, 640 CPU TRC, 661 CPU TLO, 660 CPU TRO, 610 CPU TDN, 611 CPU TSN, 630 CPU TDZ, 631 CPU TSZ, 650 CPU TDC, 651 CPU TSC, 670 CPU TDO, 671 CPU TSO, 047 CPU CALLI, 051 CPU TTCALL, : C CONSTANT ; 12 C T 13 C TT 14 C SP 15 C IC 17 C RP 11 C DP 10 C V : NEXT, 344675000000 , ; ' NEXT, 2 + CONSTANT NEXT 16 C FORTPARM ( FOR FORTRAN ROUTINES) : @) 20000000 + ; : I/ 20 + ; : M/ 40 + ; : S/ 60 + ; CODE ) 22 T LSH, 14000001 T ADD, BINARY J, : S) 1 SP ) ; : L/ 20 + ; : E/ 40 + ; : LE/ 60 + ; : A/ 100 + ; : GE/ 120 + ; : N/ 140 + ; : G/ 160 + ; : B/ S/ ; : HZ/ 200 + ; : HO/ 400 + ; : HE/ 600 + ; CODE OR S) T B/ IOR, POP J, CODE XOR S) T B/ XOR, POP J, : NOT/ 100 XOR ; DECIMAL ;S ( MINUS SLEEP - LAST HERE @ ! +! AND MIN ILDB TYO TYI OC) CODE MINUS T T MOVN, PUT J, CODE SLEEP 25 T CALLI, POP J, CODE - T T MOVN, S) T ADD, BINARY J, POP 1 - CONSTANT POP. BASE 8 - CONSTANT LAST CODE HERE DP T HZ/ HRR, PUSH J, CODE @ 0 T ) T MOVE, PUT J, CODE = S) TT MOVE, 0 T ) TT M/ MOVE, POP. J, CODE ! S) TT MOVE, 0 T ) TT M/ MOVE, POP. J, CODE += S) TT MOVE, 0 T ) TT B/ ADD, POP. J, CODE +! S) TT MOVE, 0 T ) TT B/ ADD, POP. J, CODE AND S) T B/ AND, POP J, CODE MIN S) T GE/ CAM, BINARY J, POP J, CODE ILDB 0 T ) T ILDB, PUT J, CODE TYO T 1 TTCALL, POP J, ( TYPE 1 CHARACTER) : OC TYO ; ( HISTORICAL NECESSITY) CODE TYI T 0 TTCALL, PUSH J, ( INPUT 1 CHARACTER) CODE ROT 1 SP ) 0 MOVE, 2 SP ) 0 EXCH, 1 SP ) T M/ MOVE, 0 T MOVE, PUT J, ;S ( MAX ABS OVER IF, IFL, ETC ADRFLD 1 0 -1 1+ 1-) CODE MAX S) T LE/ CAM, BINARY J, POP J, CODE ABS T T MOVM, PUT J, CODE OVER S) T MOVE, PUSH J, : IF, NOT/ 0 SWAP JUMP, HERE 1 - ; : THEN, HERE SWAP +! ; : ELSE, 0 IF, SWAP THEN, ; : BEGIN, HERE ; : END, J, ; : IFL, T L/ IF, ; : IFLE, T LE/ IF, ; : IFE, T E/ IF, ; : IFA, T A/ IF, ; : IFGE, T GE/ IF, ; : IFG, T G/ IF, ; : IFN, T N/ IF, ; OCTAL : ADRFLD 777777 AND ; DECIMAL : +CON CONSTANT ;CODE 0 V ) T ADD, PUT J, 1 +CON 1+ 2 +CON 2+ -1 +CON 1- -2 +CON 2- CODE <R T RP PUSH, POP J, CODE R> T RP POP, PUSH J, ;S ( IMMEDIATE NEXT I J K) OCTAL : IMMEDIATE 1 LAST @ 1- +! ; IMMEDIATE CODE XIF IFE, 0 IC ) IC MOVE, POP J, THEN, 1 IC I/ ADD, POP J, CODE XELSE 0 IC ) IC MOVE, NEXT, CODE XDO S) RP PUSH, T RP PUSH, POP 1- J, CODE XLOOP 0 RP ) 0 AOS, 0 RP ) TT MOVE, 777777 RP ) TT SUB, TT L/ IF, 0 IC ) IC MOVE, NEXT, THEN, 1 IC I/ ADD, 2 RP I/ SUB, NEXT, CODE X+LOOP 0 RP ) TT MOVE, T TT ADD, 0 RP ) TT M/ MOVE, 777777 RP ) TT SUB, T TT XOR, TT L/ IF, 0 IC ) IC MOVE, POP J, THEN, 1 IC I/ ADD, 2 RP I/ SUB, POP J, CODE I 0 RP ) T MOVE, PUSH J, CODE J 777776 RP ) T MOVE, PUSH J, CODE K 777774 RP ) T MOVE, PUSH J, CODE TERM 777777 RP ) TT MOVE, 0 RP ) TT M/ MOVE, NEXT, DECIMAL ;S ( DO LOOP +LOOP IF THEN ELSE BEGIN END) : DO IMMEDIATE ' XDO , HERE ; : LOOP IMMEDIATE ' XLOOP , , ; : +LOOP IMMEDIATE ' X+LOOP , , ; : IF IMMEDIATE ' XIF , HERE 0 , ; : THEN IMMEDIATE HERE SWAP ! ; : ELSE IMMEDIATE ' XELSE , 0 , HERE SWAP ! HERE 1- ; : BEGIN IMMEDIATE HERE ; : END IMMEDIATE ' XIF , , ; ;S ( =L 0= > SET IARRAY INTEGER DP+= ARRAY SUBROUTINE) CODE =L S) T SUB, IFE, 1 T I/ MOVE, ELSE, 0 T I/ MOVE, THEN, BINARY J, : 0= 0 =L ; CODE > S) T SUB, IFGE, 0 T I/ MOVE, ELSE, 1 T I/ MOVE, THEN, BINARY J, : < SWAP > ; : <= > 1 XOR ; : >= < 1 XOR ; : SET SWAP CONSTANT , ;CODE 0 V ) TT MOVE, 1 V ) @) TT M/ MOVE, NEXT, OCTAL : IARRAY CODE 1000001 DP +! ;CODE 0 V ) T I/ MOVE, PUSH J, : INTEGER IARRAY , ; OCTAL 1000001 INTEGER 1,1 DECIMAL CODE DP+! 1,1 T IMUL, T DP ADD, POP J, : ARRAY IARRAY DP+! ; : SUBROUTINE 0 INTEGER ; ;S ( INTEGER /MOD */ * *+ MOD / LSH ASH BYTE-POINTER IBP IN) OCTAL : (POP) ABORT SP ABJP, ; CODE /MOD S) T MOVE, -43 777777 AND T ASHC, 0 SP ) T DIV, S) TT M/ MOVE, PUT J, CODE */ S) T MOVE, S) 1+ T MUL, 0 SP ) T DIV, (POP) BINARY J, CODE * S) T M/ IMUL, POP J, : *+ * + ; : MOD /MOD DROP ; CODE / S) T EXCH, S) T M/ IDIV, POP J, CODE LSH S) TT MOVE, 0 T ) TT LSH, TT T MOVE, BINARY J, CODE ASH S) TT MOVE, 0 T ) TT ASH, TT T MOVE, BINARY J, CODE ROTATE S) TT MOVE, 0 T ) TT ROT, TT T MOVE, BINARY J, : BYTE-POINTER 6 LSH OR 30 LSH OR CONSTANT ; 0 7 44 BYTE-POINTER FBYTE ( FIRST BYTE OF WORD) CODE IBP 0 T ) 0 IBP, POP J, BASE 10 + C IN BASE 1+ C DELIM BASE 5 + C D BASE 7 + C F CODE 2* 2 T I/ IMUL, PUT J, CODE 2/ 2 T I/ IDIV, PUT J, DECIMAL ;S ( [ SIXBIT XWD) OCTAL CODE 2GET 777776 IC ) T MOVE, 1,1 SP SUB, 0 SP ) T M/ MOVE, 777775 IC ) T MOVE, PUSH J, : [ IMMEDIATE ' XELSE , HERE 0 , HERE 135 DELIM ! WORD 1+ FBYTE + COUNT DUP 5 / 2 + DP+! , , HERE SWAP ! ' 2GET , ; : 7T6 40 - 0 MAX 77 MIN ; 0 INTEGER BPTR 0 INTEGER 6B : SIXBIT WORD FBYTE 1+ HERE + BPTR ! BPTR IBP 6 0 DO BPTR ILDB 7T6 6B @ 6 LSH OR 6B ! LOOP 6B @ ; : XWD ADRFLD SWAP 22 LSH OR ; DECIMAL ;S ( TEXT EDITOR) : EDITOR ; : FORGET FLUSH FORGET ; BASE @ OCTAL 0 INTEGER TEXT 14 DP+! : CLR-BLK BLOCK UPDATE BLANKS OVER ! DUP 1+ 377 MOVE ; : STRING BLANKS TEXT ! TEXT TEXT 1+ 14 MOVE DELIM ! WORD FBYTE HERE 1+ + COUNT FBYTE TEXT + SWAP BYTES ; : " 42 STRING ; : ( 51 STRING ; : MOVE 100 BYTES ; FBYTE TEXT + CONSTANT FTEX : HOLD DUP LINE FTEX MOVE ; : T HOLD 2 SPACES LINE 100 RTYPE CR ; : R LINE UPDATE FTEX SWAP MOVE ; : D DUP 24 >= IF ELSE HOLD 24 SWAP DO I 1+ LINE DUP -100 VIBP MOVE LOOP UPDATE THEN ; : I 23 MIN 0 MAX 1+ DUP 23 DO I LINE DUP 100 VIBP MOVE -1 +LOOP R ; : BT BLK @ LIST ; WOPEN BASE ! ;S ( CODED VIBP, BLOCK-SUMMARY) CODE VIBP 5 T I/ IDIV, ( T=QUO., TT=REM.) T LE/ IF, TT L/ IF, T 0 SOS, THEN, THEN, TT N/ IF, TT L/ IF, 5 TT I/ ADD, THEN, BEGIN, S) 0 IBP, TT 0 LE/ SOS, END, THEN, S) T ADD, BINARY J, : BLOCK-SUMMARY 13 LOAD ; ;S ( USED FOR BLOCK-SUMMARY) CODE IX 0 RP ) T MOVE, PUSH J, ( BECAUSE 'I' REDEFINED) EDIT LOAD : ME 1+ SWAP DO [ BLOCK] TYPE IX . IX BLK ! 1 T LOOP ; ME FORGET IX ;S ( MK!, MK@, RTYPE, SPACE, SPACES) OCTAL 201004020100 C BLANKS : SPACE 40 OC ; : SPACES 0 DO SPACE LOOP ; 0 INTEGER MK CODE MK= DP TT HZ/ HRR, MK TT M/ MOVE, NEXT J, CODE MK! DP TT HZ/ HRR, MK TT M/ MOVE, NEXT, CODE MK@ MK T MOVE, PUSH J, : RTYPE OVER OVER VIBP :< 0 T M/ MOVE, ABORT SP ABJP, 0 SP ) T MOVE, 0 0 IBP, MK! 0 0 IBP, 0 0 IBP, 0 0 IBP, 0 0 SOS, 0 TT ILDB, 40 TT I/ SUB, TT E/ IF, 1 T I/ SUB, MK@ J, THEN, >: TYPE ; DECIMAL ;S ( FLOATING POINT) OCTAL : FPTASK ; 132 CPU FSC, 144 CPU FADR, 154 CPU FSBR, 164 CPU FMPR, 174 CPU FDVR, 131 CPU DFN, 130 CPU UFA, 140 CPU FAD, 150 CPU FSB, 160 CPU FMP, 170 CPU FDV, : FL/ I/ ; ( LONG) CODE F+ S) T M/ FADR, POP J, : F- MINUS F+ ; CODE F* S) T M/ FMPR, POP J, CODE F/ S) T EXCH, S) T M/ FDVR, POP J, -377000000001 INTEGER EXMSK CODE FIX2 T TT MOVM, -33 ADRFLD TT LSH, 200 TT I/ SUB, EXMSK T AND, 10 T ASH, 0 SP ) T M/ MOVE, TT T MOVE, PUSH J, DECIMAL ;S ( FBYTE MOVE LINE LIST COPY FLUSH BYTES SHOW DISCARD) OCTAL : . CONVERT COUNT TYPE ; : ? @ . ; CODE MOVE T TT MOVE, S) TT ADD, 1 TT I/ SUB, S) T HRR, S) 1+ T HRL, 0 TT ) T BLT, (POP) POP. J, ( FROM TO NWDS MOV) 0 INTEGER TEMP 0 INTEGER BLK 0 INTEGER MSGBLK : LINE 24 MIN 1 MAX 1- 100 * 5 /MOD BLK @ BLOCK + FBYTE + TEMP ! DUP IF 0 DO TEMP IBP LOOP ELSE DROP THEN TEMP @ ; : LIST BLK ! F @ 2 F ! 25 1 DO I . SPACE I LINE 100 RTYPE CR LOOP F ! ; : COPY BLOCK UPDATE SWAP BLOCK SWAP 400 MOVE FLUSH ; : FLUSH FLUSH FLUSH ; ( NOW WILL FLUSH BOTH BUFFERS) CODE BYTES HERE S) 1 + TT ILDB, S) TT IDPB, T G/ SOJ, (POP) POP. J, ( FROM BYT-PTR TO BYT-PTR #BYTES BYTES) : SHOW 1+ SWAP DO CR [ BLOCK ] TYPE I . CR I LIST LOOP CR ; : MESSAGE 24 /MOD MSGBLK @ + BLK ! 1+ LINE 100 RTYPE ; DECIMAL ;S ( OO, DUMP, 1+!, 1-!, 0SET, 1SET) OCTAL : OO 14 0 DO :< 3 T ROT, 0 SP ) T M/ MOVE, 7 T I/ AND, 0 T M/ MOVE, >: 0 ? LOOP DROP SPACE ; : @O DUP @ OO ; : DUMP 4 / 1+ 0 DO DUP I 4 * + DUP . SPACE @O 1+ @O 1+ @O 1+ @ OO CR LOOP DROP ; CODE 1+! 0 T ) 0 AOS, POP J, CODE 1-! 0 T ) 0 SOS, POP J, CODE 0SET 0 T ) 0 M/ SETZ, POP J, CODE 1SET 1 TT I/ MOVE, 0 T ) TT M/ MOVE, POP J, DECIMAL ;S ( LOGOUT) OCTAL 637163000000 INTEGER LGOB 545747576564 , 0 , 0 , 0 , 0 , ( SPECIFIES SYS:LOGOUT AS PROGRAM TO BE RUN) CODE LOGOUT LGOB 1 I/ HZ/ HRR, 35 1 CALLI, ABORT J, LOGOUT ( DO IT!) DECIMAL ;S ( VT52) OCTAL : SESC 33 TYO TYO ; : GRAPHICS 106 SESC ; : NOGRAPHICS 107 SESC ; : CURSOR 131 SESC SWAP 40 + TYO 40 + TYO ; : HOME 110 SESC ; : ERASE-SCREEN 112 SESC ; : CLEAR HOME ERASE-SCREEN ; : LIST CLEAR DUP . CR LIST ; DECIMAL ;S ( NEW FLOATING POINT LOADER) 15 LOAD 41 LOAD 42 LOAD ;S ( NEW FLOATING SQRT FIX FLOAT LOG LOG10 EXP SIN COS ATAN) OCTAL 0 ARRAY .XX 0 , 0 , 0 ARRAY ARG 200 .XX XWD , -1 0 XWD , 0 ARRAY ARGA 200 .XX XWD , -2 0 XWD , MK! .XX T M/ MOVE, ARG FORTPARM I/ MOVE, ( FP RTN SUBR) 1 @) RP PUSHJ, 0 T MOVE, PUT J, CODE SQRT FORTRAN 12 + 1 MOVE, MK@ J, CODE FIX T 2 MOVE, FORTRAN @) RP PUSHJ, 2 T MOVE, PUT J, CODE FLOAT T 2 MOVE, FORTRAN 10 + @) RP PUSHJ, 2 T MOVE, PUT J, CODE LOG10 FORTRAN 1+ 1 MOVE, MK@ J, CODE LOG FORTRAN 2+ 1 MOVE, MK@ J, CODE EXP FORTRAN 13 + 1 MOVE, MK@ J, CODE SIN FORTRAN 11 + 1 MOVE, MK@ J, CODE COS FORTRAN 7 + 1 MOVE, MK@ J, CODE ATAN .XX T M/ MOVE, ARGA FORTPARM I/ MOVE, FORTRAN 5 + @) RP PUSHJ, 0 T MOVE, PUT J, DECIMAL ;S ( FLOATING ATAN2 CEXP) OCTAL 0 ARRAY ARGB 200 .XX XWD , 200 .XX 1+ XWD , -1 0 XWD , 0 ARRAY ARGC 600 .XX XWD , -1 0 XWD , CODE ATAN2 S) 1 MOVE, .XX 1 M/ MOVE, .XX 1+ T M/ MOVE, ARGB FORTPARM I/ MOVE, FORTRAN 4 + @) RP PUSHJ, (POP) 0 T MOVE, PUT J, CODE CEXP S) 1 MOVE, .XX 1+ 1 M/ MOVE, .XX T M/ MOVE, ARGC FORTPARM I/ MOVE, FORTRAN 6 + @) RP PUSHJ, S) 0 M/ MOVE, 1 T MOVE, PUT J, DECIMAL ;S ( FFT LOADER) : FFTTASK ; FPMATH LOAD 45 LOAD 46 LOAD 47 LOAD : ZERO DIM @ 0 DO 0 0 I !C LOOP ; : EE DIM @ 0 DO I @C 100000 FLOAT F* SWAP 100000 FLOAT F* FIX . SPACE FIX . 5 SPACES I 4 MOD 3 =L IF CR THEN LOOP ; ;S ( FFT WORDS) 6 CORE OCTAL 1000 INTEGER DIM 11 INTEGER LOGDIM DIM @ 2* ARRAY DATA ( COMPLEX DATA AREA) CODE @C 1 T ASH, DATA T I/ ADD, 0 T ) TT MOVE, 0 SP ) TT M/ MOVE, 1 T ) T MOVE, PUSH J, CODE !C 1 T ASH, DATA T I/ ADD, 1 SP ) 0 MOVE, 1 T ) 0 M/ MOVE, 2 SP ) 0 MOVE, 0 T ) 0 M/ MOVE, (POP) POP. J, CODE BR 0 0 SETZ, T 2 MOVE, LOGDIM 3 MOVE, HERE -1 ADRFLD 1 ROTC, 1 0 LSHC, 3 G/ SOJ, 0 T MOVE, PUT J, ( REVERSE LOGDIM BITS) : REVDAT DIM @ 0 DO I BR I > IF I @C I BR @C I !C I BR !C THEN LOOP ; DECIMAL ;S ( FFT 2) OCTAL 202622077325 CONSTANT PI 203622077325 CONSTANT 2PI 0 INTEGER FX : CDUP OVER OVER ; : CDROP DROP DROP ; CODE COVER 3 SP ) 0 MOVE, 2 SP ) 1 MOVE, >: 0 @ 1 @ ; CODE C+ 3 SP ) 0 MOVE, 1 SP ) 0 FADR, 3 SP ) 0 M/ MOVE, 2 SP ) T FADR, 2 SP ) T M/ MOVE, POP. J, CODE C- 3 SP ) 0 MOVE, 1 SP ) 0 FSBR, 3 SP ) 0 M/ MOVE, 2 SP ) 0 MOVE, T 0 FSBR, 2 SP ) 0 M/ MOVE, POP. J, CODE C* 1 SP ) 0 MOVE, 3 SP ) 0 FMPR, T 1 MOVE, 2 SP ) 1 FMPR, 1 0 FSBR, 3 SP ) T FMPR, 1 SP ) 1 MOVE, 2 SP ) 1 FMPR, T 1 FADR, 3 SP ) 0 M/ MOVE, 2 SP ) 1 M/ MOVE, POP. J, : DIVCIRC FLOAT 2PI SWAP F/ ; DECIMAL ;S ( FFT 3) 1 INTEGER FFTSENSE : FFT REVDAT FX 1SET BEGIN FX @ 2* DIVCIRC FFTSENSE @ 0= IF MINUS THEN DUP COS SWAP SIN 1 FLOAT 0 FX @ 0 DO DIM @ I DO CDUP I FX @ + @C C* I @C COVER C- I FX @ + !C I @C C+ I !C FX @ 2* +LOOP COVER C* LOOP CDROP CDROP FX @ 2* DUP FX ! DIM @ < 1- END ; 1 FFTSENSE SET FORWARD 0 FFTSENSE SET REVERSE ;S ( FFT PLOT) VT52 LOAD : RECIPROCAL 1 FLOAT SWAP F/ ; : XY <R 23 SWAP - SWAP CURSOR R> TYO ; 10 FLOAT INTEGER SCALE 12 INTEGER OFFSET : PLOT CLEAR DIM @ 0 DO I @C SCALE @ F* FIX I SWAP OFFSET @ + 35 XY SCALE @ F* FIX I SWAP OFFSET @ + 34 XY LOOP ; ;S ( OUTPUT WORDS) : ,CODE CODE HERE 1+ + V JSP, ; : SPACES 0 MAX DUP IF DUP SPACES THEN DROP ; 1 ,CODE HOLD HERE 0 , T /G IF, OVER 0 IBP, OVER 0 IBP, OVER 0 IBP, OVER 0 IBP, OVER 0 SOS, OVER T DPB, THEN, DROP POP J, ;S ( STRINGS LOAD BLOCK) : STRINGS ; 66 LOAD 67 LOAD 68 LOAD 69 LOAD 70 LOAD ;S ( STRINGS FOR PDP-10) 17 CONSTANT ^SIZE ( WORDS PER STRING) ^SIZE 5 * 1- CONSTANT ^CSIZE ( CHARACTERS PER STRING) -1 INTEGER ^SP 8 CONSTANT ^SPMAX ( MAX # STRINGS) ^SPMAX ^SIZE * ARRAY ^STACK ( STRING STACK) : SPA ^SIZE * ^STACK + ; ( CVT STK PTR TO ADDRESS) : ^SP@ ^SP @ ; : ^SP@SPA ^SP @ SPA ; : ^MOVE ^SIZE MOVE ; : ^-SP@SPA ^SP @ 1- SPA ; : SPO? ^SP@ 1+ ^SPMAX >= IF QUESTN THEN ; ( ABORT ON OFLO) : SPU? ^SP@ 0 < IF -1 ^SP ! QUESTN THEN ; ( ABORT ON UFLO) ^SIZE ARRAY .TMP : ^SWAP ^-SP@SPA .TMP ^MOVE ^SP@SPA ^-SP@SPA ^MOVE .TMP ^SP@SPA ^MOVE ; : ^DROP SPU? ^SP 1-! ; ;S ( STRINGS, 2) CODE LDB T 0 ) T ILDB, PUT J, ( NOTE ILDB!) CODE DPB S) TT MOVE, T 0 ) TT IDPB, POP. J, ( NOTE IDBP!) : FB FBYTE + ; : ^LEN ^SP@SPA FB LDB ; : ^-LEN ^-SP@SPA FB LDB ; : ^@ SPO? ^SP 1+! ^SP@SPA ^MOVE ; : ^DUP SPO? ^SP@SPA ^@ ; : ^OVER SPO? ^-SP@SPA ^@ ; : ^! ^SP@SPA FB SWAP FB ^LEN 1+ BYTES ^DROP ; : ^TYPE SPU? ^SP@SPA FB 1 VIBP ^LEN TYPE ^DROP ; : ^C! ^SP@SPA FB SWAP VIBP DPB ; : ^C@ ^SP@SPA FB SWAP VIBP LDB ; : ^LEN! 0 MAX 0 ^C! ; : ^NULL SPO? ^SP 1+! 0 ^LEN! ; : ^STR DELIM ! ^NULL WORD HERE 1+ ^SP@SPA ^MOVE ; : " 34 ^STR ; : (( 41 ^STR ; ( STRINGS DON'T COMPILE) : ^CLR -1 ^SP ! ; ;S ( STRINGS, 3) : ^CAT SPU? ^-LEN ^CSIZE SWAP - ^LEN MIN DUP 0 > IF DUP <R ^-SP@SPA FB DUP LDB 1+ VIBP ^SP@SPA FB 1 VIBP SWAP R> BYTES ^DROP ^LEN + ^LEN! ELSE DROP ^DROP THEN ; : ^PAD ^SWAP ^LEN - DUP 0 > IF 0 DO ^OVER ^CAT LOOP ^SWAP ^DROP ELSE DROP ^SWAP ^DROP THEN ; : ^SUBSTR OVER - 1+ OVER ^LEN 1+ SWAP - MIN DUP <R ^LEN! ^SP@SPA FB SWAP VIBP ^SP@SPA FB 1 VIBP R> BYTES ; : ^LINE! SPU? ^NULL 1 ^LEN! 32 1 ^C! 64 ^PAD LINE ^SP@SPA FB 1 VIBP SWAP 64 BYTES UPDATE ^DROP ; ;S ( STRINGS, 4) : ^STRING IARRAY ^LEN HERE ^! 1+ 5 /MOD 1+ SWAP IF 1+ THEN DP+! ;CODE 0 V ) T I/ MOVE, 0 SP POP, 0 SP ) T M/ MOVE, >: ^@ ; (( ) ^STRING BLANK : BLANKS ^NULL BLANK ^PAD ; : =STRING ^SP@SPA FB ^-SP@SPA FB .TMP 1SET ^LEN 1+ 0 DO OVER LDB OVER LDB - <R 1 VIBP SWAP 1 VIBP SWAP R> IF .TMP 0SET TERM THEN LOOP DROP DROP ^DROP ^DROP .TMP @ ; : -SPACES 1 ^LEN DO I ^C@ 32 =L I ^LEN! 0= IF TERM THEN -1 +LOOP ; : ^LINE SPO? ^SP 1+! LINE ^SP@SPA FB 1 VIBP 64 ^CSIZE MIN DUP <R BYTES R> ^LEN! ; : ^SUBSTR! SWAP 1- 1 SWAP ^OVER ^SUBSTR ^SWAP ^CAT ^SWAP 1+ ^CSIZE ^SUBSTR ^CAT ; ;S : ^INDEX ^LEN 1- 0 ^-LEN ^LEN - 2+ 1 DO ^OVER OVER I + I SWAP ^SUBSTR ^OVER =STRING IF DROP I TERM THEN LOOP SWAP DROP ^DROP ^DROP ; ( CODED ^INDEX) OCTAL : ^INDEX ^-SP@SPA FB ^SP@SPA FB :< T T SUB, ( PREPARE 0 RTN) 0 SP ) TT ILDB, ( LENGTH OF T = J) 1 SP ) 10 ILDB, ( LENGTH OF S = N) ^SP 0 SOS, ^SP 0 SOS, TT 10 GE/ CAM, BINARY J, ( IF J>N ) 10 5 MOVE, TT 5 SUB, 5 0 AOS, ( N-J+1) 1 2 I/ MOVE, 0 SP ) 1 ILDB, ( 1ST CHAR. OF T) BEGIN, MK! ( START MAJOR LOOP) 1 SP ) 0 ILDB, ( S<J> ) 1 0 N/ CAM, HERE 5 + J, ( B: SORRY!) 1 2 I/ ADD, 5 2 G/ CAM, END, BINARY J, ( RETURN ZERO) ( B:) 0 SP ) 3 MOVE, ( T POINTER) 1 SP ) 4 MOVE, ( S POINTER) TT 6 MOVE, 1 6 I/ SUB, ( J-1 ) 6 G/ IF, BEGIN, 4 0 ILDB, 3 10 ILDB, 10 0 E/ CAM, MK@ 2 A/ AOJ, ( -MAJOR) 6 0 LE/ SOS, END, THEN, 1 SP ) 2 M/ MOVE, >: DROP ; DECIMAL ;S ( XED LOADER) : EDITOR ; : FORGET FLUSH FORGET ; : GOODBY FLUSH GOODBY ; STRINGS LOAD 72 LOAD 73 LOAD 74 LOAD WOPEN ;S ( XED - EXTENDED EDITOR) 1 INTEGER L# : LL DUP L# ! ; : H LL ^LINE ; : T LL ^LINE -SPACES 2 BLANKS ^SWAP ^CAT ^TYPE ; : R LL ^LINE! UPDATE ; : D LL DUP 20 < IF 20 SWAP DO I 1+ LINE DUP -64 VIBP 64 BYTES LOOP ELSE DROP THEN BLANK 20 ^LINE! UPDATE ; : II LL DUP 19 DO I LINE DUP 64 VIBP 64 BYTES -1 +LOOP 1+ R ; : HT LL ^LINE ^DUP -SPACES 2 BLANKS ^SWAP ^CAT ^TYPE ; : HR DUP H ^SWAP ^LINE! UPDATE ; : HD DUP DUP H 20 < IF 20 SWAP DO I 1+ LINE DUP -64 VIBP 64 BYTES LOOP ELSE DROP THEN BLANK 20 ^LINE! UPDATE ; ;S ( XED 2) : HI 20 H ^SWAP LL DUP 19 DO I LINE DUP 64 VIBP 64 BYTES -1 +LOOP 1+ R ; : HOLD 1+ SWAP DO I ^LINE LOOP ; : UNHOLD DO I ^LINE! -1 +LOOP UPDATE ; : +B BLK 1+! ; : -B BLK 1-! ; : FND 0 21 L# @ DO DROP I L# ! I ^LINE ^OVER ^INDEX DUP IF TERM THEN LOOP DUP 0= IF [ FAILED ] TYPE THEN ^DROP ; : FT BEGIN ^DUP FND DUP 0= IF BLK ? CR BLK 1+! 1 L# ! THEN END ^DROP CR BLK ? SPACE L# @ DUP . CR T ; : L1 1 L# ! ; : LIST L1 LIST CR [ L# =1] TYPE ; : L? L# ? ; : LT L? L# @ CR T ; : BT BLK @ DUP . CR LIST ; : FR ^SWAP ^LEN FND DUP IF L# @ ^LINE SWAP OVER + 1- ^SWAP ^SUBSTR! L# @ ^LINE! UPDATE ELSE DROP THEN ; ;S ( XED 3) : FD ^NULL FR ; : FI ^SWAP ^LEN FND DUP IF L# @ ^LINE SWAP + DUP 1- ^SWAP ^SUBSTR! L# @ ^LINE! UPDATE ELSE DROP THEN ; OCTAL : CLR-BLK BLK ! BLK @ BLOCK UPDATE 201004020100 OVER ! DUP 1+ 377 MOVE ; DECIMAL : I II ; ;S ( NEW TRANSFER LOAD BLOCK) : TRANSFER ; 5 CORE : CLEAR ; 52 LOAD 53 LOAD 56 LOAD 54 LOAD 57 LOAD 75 LOAD : BEGIN CR CR [ *** PDP-10 TO PDP-11 TRANSFER PROGRAM] TYPE CR CR ; ;S