perm filename WH[F,PMP]2 blob
sn#020618 filedate 1972-10-26 generic text, type T, neo UTF8
00100 TITLE WH PREPARE AN MJW TEST FILE FROM AN RPH WIRE LIST (TST) FILE
00200
00300 P←17 A←1 B←2 C←3 D←4 E←5 F←6
00400 G←7 H←10 J←11 J1←12 Q←13 T←14 T1←15 T2←16
00500
00600 PRTSW←←1
00700 STRT: CALLI
00800 INIT 1,10
00900 SIXBIT /DSK/
01000 DIB
01100 JRST 4,.
01200 MOVE P,[XWD -PDLEN,PDL-1]
01300 MOVEI A,LUP
01400 SETZM LUP
01500 FOR I←1,3 {SETZM LUP+I
01600 }
01700 MOVEI D,'TST'
01800 HRLM D,LUP+1
01900 OUTSTR [ASCIZ /INPUT /]
02000 PUSHJ P,FNAM
02100 LOOKUP 1,LUP
02200 JRST NOLUP
02300 INIT 2,10
02400 SIXBIT /DSK/
02500 XWD DOB,0
02600 JRST 4,.
02700 EC1: SETZM ENT
02800 SETZM ENT+2
02900 SETZM ENT+3
03000 MOVEI A,'TS1'
03100 HRLZM A,ENT+1
03150 MOVE A,LUP
03175 MOVEM A,ENT
03200 MOVEI A,ENT
03500 ENTER 2,ENT
03600 JRST NOENT
03700 INBUF 1,2
03800 OUTBUF 2,2
03900 HRRZ A,JOBFF
04000 ADDI A,1
04100 TRZ A,1
04200 MOVEM A,FSTPNT#
04300 HRRZ B,JOBREL
04400 EXTERN JOBFF,JOBREL
04500 ADDI A,2
04600 MOVEM A,-2(A)
04700 CAMGE A,B
04800 JRST .-3
04900 SETZM -2(A)
05000 SETZM CEPNUM#
05100 DEFINE CLR (Q,SIZ)
05200 { SETZM Q
05300 MOVE A,[XWD Q,Q+1]
05400 BLT A,Q+SIZ}
05500 CLR (CEPINS,=144)
05600 CLR (HTYPS,777)
05700 CLR (MTYPS,777)
05750 CLR (QTYPS,777)
05800 CLR (CEPPIN,=144)
05900 CLR (IGRF,=1299)
06000 CLR (OGRF,=1299)
06100 JRST ST
00100 LUP: BLOCK 4
00200 DIB: BLOCK 3
00300 ENT: BLOCK 4
00400 DOB: BLOCK 3
00500 PDLEN←4000
00600 PDL: BLOCK PDLEN
00700 DEFINE GETFS (A)
00800 { SKIPN A,FSTPNT
00900 JSR NOFST}
01000 DEFINE GETFST (A,B)
01100 { SKIPN A,FSTPNT
01200 JSR NOFST
01300 MOVE B,(A)
01400 MOVEM B,FSTPNT}
01500 DEFINE FSTRET (A)
01600 { PUSH P,FSTPNT
01700 POP P,(A)
01800 MOVEM A,FSTPNT}
01900
02000 ;TYPE FLAG BITS: (LEFT HALF OF TYPTB3)
02100 FFOK←←400
02200 FFBIT←←20
02300 FFAOI←←40
02400 SECTN←←100
02500 REPLC←←200
02520 FFSTP←←1000 ;TYPE OF GATE WHICH STOPS GATE-DELAY CALC
02540 FFG1←←2000 ;TYPE OF FF FOR WHICH GATE-DELAY MUST BE DONE(TYPE 1)
02560 FFG2←←4000 ;TYPE OF FF FOR WHICH GATE-DELAY MUST BE DONE(TYPE 2)
02600
02700
02800 DEFINE TYPES
02900 { TYP (74S00,10010100100,FFOK+0,RTS00,S00,CTS00,CTNAND)
03000 TYP (74S10,100010100000,FFOK+2,RTS10,S10,CTS10,CTNAND)
03100 TYP (74S04,101010101010,FFOK+1,RTS04,S04,CTS04,CTINV)
03200 TYP (74S20,10100000,FFOK+2,RTS20,S20,CTS20,CTNAND)
03250 TYP (74S140,10100000,FFOK+2,RTS20,S140,CTS20,CTNAND)
03300 TYP (74S133,100000000,FFOK+2,0,S133,CTS133,CTNAND)
03400 TYP (74S64,10000000,FFOK+3,0,S64,0,CTS64)
03500 TYP (74S74,110110000,FFBIT+FFSTP,0,S74,CTS74,CTF74)
03600 TYP (74S112,101110000,FFBIT+FFSTP,0,S112,CTS112,CTF112)
03700 TYP (74H183,1010110000,SECTN+FFSTP,H183ST,H183,0,CTH183)
03800 TYP (74S11,100010100000,0,0,S11,CTS11,CTAND)
03900 TYP (FF0,1100,FFBIT+FFG1,0,FF0,0,CTFF0)
04000 TYP (FF1,110000000000000,FFBIT+FFG2,0,FF1,0,CTFF1)
04100 TYP (FF2,110000000000000,FFBIT+FFSTP,0,FF2,0,CTFF2)
04200 TYP (FF3,110000000000000,FFBIT+FFSTP,0,FF3,0,CTFF3)
04300 TYP (FF4,110000000000000,FFBIT+FFSTP,0,FF4,0,CTFF4)
04400 TYP (74153,101000000,SECTN+FFSTP,A153ST,A153,0,CT153)
04410 TYP (74S174,100101011010010,FFBIT+SECTN+FFSTP,S174ST,S174,CTS174,CTF74)
04420 TYP (74S175,110011001100110,FFBIT+SECTN+FFSTP,S175ST,S175,CTS175,CTF74)
04430 TYP (74S157,100101001000,SECTN+FFSTP,S157ST,S157,CTS158,CTF157)
04440 TYP (74S158,100101001000,SECTN+FFSTP,S157ST,S158,CTS158,CTF158)
04450 TYP (74S151,110000,FFSTP,0,S151,0,CTF151)
04500 }
04600 DEFINE TYP (A,B,C,D,E,F,G)
04700 { [ASCIZ /A/]}
04800 TYPTB1: TYPES
04900 TYPNUM←←.-TYPTB1
05000 DEFINE TYP $(A,B,C,D,E)
05100 { B$0
05200 E←←FOO
05300 FOO←←FOO+1}
05400 FOO←←0
05500 RADIX 2
05600 TYPTB2: TYPES
05700 RADIX =8
05800 DEFINE TYP (A,B,C,D,E)
05900 { XWD C,D}
06000 TYPTB3: TYPES
06100 DEFINE TYP (A,B,C,D,E,F,G)
06200 { XWD F,G}
06300 TYPTB4: TYPES
06400
06500 CEPPIN: BLOCK =145
06600 CEPINS: BLOCK =145
06700 0
06800 HTYPS: BLOCK 1000
06900 XWD 377777,-1
07000 MTYPS: BLOCK 1000
07020 QTYPS: BLOCK 1000
07100
07200 IGRF: BLOCK =1300
07300 OGRF: BLOCK =1300
07400
07500 ITAB1: SKIPA
07600 JRST NOU
07700 SKIPA
07800 SKIPA
07900 JRST NOU
08000 SKIPA
08100 SKIPA
08200 SKIPA
08300 JFCL
08400 JFCL
08500 SKIPA
08600 SKIPA
08700 JFCL
08800 JFCL
08900 JFCL
09000 SKIPA
09100
09200 ITAB2: SETOM DIDSW
09300 SETOM DIDSW
09400 SETOM DIDSW
09500 JFCL
09600
09700 ITAB3: JRST NOU
09800 JRST FWL10
09900 JRST FWL10
10000 JRST FWL10
10100
10200 ITAB5: XCT ITAB3(D)
10300 XCT ITAB6(D)
10400 ITAB6: JRST FWL10
10500 JRST NOU
10600 JRST FWL10
10700 JRST FWL10
10800
00100 H183ST: XWD 3,1
00200 0
00300 BYTE (6)3,4,5,0,6,0
00400 BYTE (6),,,,,1
00500 A153ST: XWD 3,1
00600 BYTE (6)0,0,0,0,-1,0
00700 BYTE (6)4,5,6,7,00,0
00800 BYTE (6)0,0,0,1,-1,3
00900
01000 FFITB1: 0
01100 0
01200 2
01300 XWD -2,6
01400 0
01500 0
01600 2
01700 XWD -2,4
01800 2
01900 2
02000 2
02100 XWD -2,6
02200 XWD 2,6
02300 XWD 2,4
02400 XWD 2,6
02500 XWD 3,10
02600
02700 FFTB2: FOR @$ I←0,4
02800 { FF$I
02900 FF$I
03000 }
03100
03200 DEFINE RF(A,B,C,D,E,F)
03300 { BYTE (6)=F,=E,=D,=C,=B,=A}
03400 DEFINE R00 (A,B)
03500 { RF (A,A,B,A,A,B)
03600 RF (0,B,A,A,B,A)
03700 RF (A,0,0,0,0,0)}
03800 RF0T00: R00 (1,3)
03900 RF0B00: R00 (2,4)
04000 RF1T00: R00 (1,14)
04100 RF1B00: R00 (16,15)
04200 RTS00: RF0T00
04300 RF0B00
04400 RF1T00
04500 RF1B00
04600 0
04700 0
04800 0
04900 RF1B00
05000
05100 DEFINE R (A,B,C,D)
05200 { RF (A,B,A,B,C,D)
05300 RF (0,D,C,B,A,D)
05400 RF (C,0,0,0,0,0)}
05500 RF1T10: R (1,2,3,14)
05600 RF1B10: R (16,17,18,15)
05700 RTS10: 0
05800 0
05900 RF1T10
06000 RF1B10
06100 0
06200 0
06300 0
06400 RF1B10
06500
06600 DEFINE R (A,B)
06700 { RF (A,B,A,B,A,B)
06800 RF (0,B,A,B,A,B)
06900 RF (A,0,0,0,0,0)}
07000
07100 RF2B04: R (14,15)
07200
07300 RTS04: 0
07400 0
07500 0
07600 0
07700 0
07800 RF2B04
07900
08000 DEFINE R (A,B,C,D,O)
08100 { RF (A,B,0,C,D,O)
08200 RF (0,O,A,B,0,C)
08300 RF (D,0,0,0,0,0)}
08400 RF1T20: R(1,2,3,4,14)
08500 RF1B20: R(16,17,18,19,15)
08600
08700 RTS20: 0
08800 0
08900 RF1T20
09000 RF1B20
09100 0
09200 RF1B20
09300
09400 DEFINE R (A1,A2,A3,A4,B1,B2,B3,C1,C2,D1,D2,O)
09500 { RF (A1,C1,C2,B1,B2,B3)
09600 RF (0,O,D1,D2,A2,A3)
09700 RF (A4,0,0,0,0,0)}
09800 RFATA: R(10,11,12,13,5,6,7,8,9,1,2,14)
09900 RFATB: R(1,2,3,4,10,11,12,5,6,8,9,14)
10000 RFATC: R(1,2,3,4,5,6,7,10,11,8,9,14)
10100 RFATD: R(1,2,3,4,5,6,7,8,9,10,11,14)
10200 RFABA: R(16,17,18,19,22,23,24,20,21,25,26,15)
10300 RFABB: R(25,26,27,28,16,17,18,22,23,20,21,15)
10400 RFABC: R(25,26,27,28,22,23,24,16,17,20,21,15)
10500 RFABD: R(25,26,27,28,22,23,24,20,21,16,17,15)
10600
10700 FOR @$ QRN IN (T,B)
10800 {QRN$ATB: 0
10900 RFA$QRN$A
11000 RFA$QRN$C
11100 RFA$QRN$C
11200 RFA$QRN$B
11300 RFA$QRN$B
11400 RFA$QRN$B
11500 0
11600 0
11700 RFA$QRN$D
11800 RFA$QRN$D
11900 RFA$QRN$A
12000 RFA$QRN$A
12100 RFA$QRN$A
12200 }
12300
12400 CTNAND: XWD =15,=15
12500 BYTE (2)3,1,1,1,1,1,1,1,1,1,1,1,1,1,0
12600 FOO←637777777400
12700 FOR I←1,=13
12800 { FOO+100
12900 FOO←((FOO⊗-2)+600000000000)&¬377
13000 }
13100 BYTE (2)3,2,2,2,2,2,2,2,2,2,2,2,2,2,2
13200 CTAND: XWD 6,6
13300 BYTE (2)3,1,1,1,1,1
13400 BYTE (2)3,0,3,3,3,0
13500 BYTE (2)3,3,0,3,3,0
13600 BYTE (2)3,3,3,0,3,0
13700 BYTE (2)3,3,3,3,0,0
13800 BYTE (2)3,2,2,2,2,2
13900 CTINV: XWD 3,3
14000 BYTE (2)3,1,0
14100 BYTE (2)3,0,1
14200 BYTE (2)3,2,2
14300 CTS64: XWD =53,=14
14400 RADIX 4
14500 313333330,,331110000
14600 331133330,,333330000
14700 333311130,,333330000
14800 333333330,,113330000
14900 DEFINE R $(A,B)
15000 {FOR @D I1 IN (03,30)
15100 {FOR @E I2 IN (033,303,330)
15200 {FOR @F I3 IN (03,30)
15300 { 3$A$DI1DEI2E31,,FI3F$B$0000
15400 }}}}
15500 R(0,333)
15600 R(3,033)
15700 R(3,303)
15800 R(3,330)
15900 322222232,,222220000
16000
16100 RADIX =8
16200 CTF74: XWD =16,7 ;TYPE D???
16300 ;I,C,D,R,S,Q,Q-
16400 BYTE (2)3,3,3,0,1,0,1
16500 BYTE (2)3,3,3,1,0,1,0
16600 BYTE (2)3,3,3,0,0,1,1
16700 BYTE (2)0,1,3,1,1,1,0
16800 BYTE (2)2,0,1,1,1,3,3
16900 BYTE (2)0,1,3,1,1,0,1
17000 BYTE (2)2,0,0,1,1,3,3
17100 BYTE (2)0,0,3,1,1,0,1
17200 BYTE (2)2,3,3,1,1,0,1
17300 BYTE (2)0,0,3,1,1,1,0
17400 BYTE (2)2,3,3,1,1,1,0
17500 BYTE (2)0,1,3,1,1,0,1
17600 BYTE (2)2,1,3,3,3,0,1
17700 BYTE (2)0,1,3,1,1,1,0
17800 BYTE (2)2,1,3,3,3,1,0
17900 BYTE (2)3,2,2,2,2,2,2
18000 CTH183: XWD =9,7
18100 BYTE (2)3,0,3,0,0,0,0
18200 BYTE (2)3,0,3,0,1,0,1
18300 BYTE (2)3,0,3,1,0,0,1
18400 BYTE (2)3,0,3,1,1,1,0
18500 BYTE (2)3,1,3,0,0,0,1
18600 BYTE (2)3,1,3,0,1,1,0
18700 BYTE (2)3,1,3,1,0,1,0
18800 BYTE (2)3,1,3,1,1,1,1
18900 BYTE (2)3,2,2,2,2,2,2
19000
19100 CTFF0: CTFF01
19200 CTFF03
19300 CTFF02
19400 CTFF01
19500 CTFF01: XWD =10,5 ;********NAND GATE TYPE FF****???
19600 BYTE (2)3,0,3,1,3
19700 BYTE (2)3,3,0,3,1
19800 BYTE (2)3,0,1,1,0
19900 BYTE (2)3,1,0,0,1
20000 BYTE (2)3,0,0,1,1
20100 BYTE (2)0,1,1,0,1
20200 BYTE (2)2,3,3,0,1
20300 BYTE (2)0,1,1,1,0
20400 BYTE (2)2,3,3,1,0
20500 BYTE (2)3,2,2,2,2
20600 CTFF02: XWD =12,5 ;********NAND GATE TYPE FF****???
20700 BYTE (2)3,0,3,1,3
20800 BYTE (2)3,3,0,3,1
20900 BYTE (2)3,0,1,1,0
21000 BYTE (2)3,1,0,0,1
21100 BYTE (2)3,0,0,1,1
21200 BYTE (2)0,1,1,0,1
21300 BYTE (2)2,3,3,0,1
21400 BYTE (2)0,1,1,1,0
21500 BYTE (2)2,3,3,1,0
21600 BYTE (2)0,1,1,0,1
21700 BYTE (2)2,0,0,3,3
21800 BYTE (2)3,2,2,2,2
21900 CTFF03: XWD =12,5 ;********NAND GATE TYPE FF****???
22000 BYTE (2)3,0,3,1,3
22100 BYTE (2)3,3,0,3,1
22200 BYTE (2)3,0,1,1,0
22300 BYTE (2)3,1,0,0,1
22400 BYTE (2)3,0,0,1,1
22500 BYTE (2)0,1,1,0,1
22600 BYTE (2)2,3,3,0,1
22700 BYTE (2)0,1,1,1,0
22800 BYTE (2)2,3,3,1,0
22900 BYTE (2)0,1,1,1,0
23000 BYTE (2)2,0,0,3,3
23100 BYTE (2)3,2,2,2,2
23200
23300 CTFF2: XWD =196,=16
23400 BYTE (2)3,1,1,1,1,3,3,3,3,3,3,3,3,3,0,1
23500 BYTE (2)3,3,3,3,3,1,1,1,3,3,3,3,3,3,0,1
23600 BYTE (2)3,3,3,3,3,3,3,3,1,1,3,3,3,3,0,1
23700 DEFINE FOO3 (A,B,C,D,O4,O5,INI,SL)
23800 {FOR I IN (<0,3,3,3>,<3,0,3,3>,<3,3,0,3>,<3,3,3,0>)
23900 {FOR J IN (<0,3,3>,<3,0,3>,<3,3,0>)
24000 {FOR K IN (<0,3>,<3,0>)
24100 {BYTE (2)INI,I,J,K,A,B,C,D,O4,O5
24200 IFDIF <SL>,<>,<BYTE (2)2,3,3,3,3,3,3,3,3,3,SL>
24300 }}}}
24400 FOO3(0,3,3,3,1,0,3)
24500 FOO3(3,0,3,3,1,0,3)
24600 FOO3(3,3,0,3,1,0,3)
24700 FOO3(3,3,3,0,1,0,3)
24800 FOO3(1,1,1,1,1,0,0,<3,3,3,3,1,0>)
24900 FOO3(1,1,1,1,0,1,0,<1,1,1,1,0,1>)
25000 BYTE (2)3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2
25100
25200 CTFF1: CTFF11
25300 CTFF13
25400 CTFF12
25500 CTFF11
25600
25700 CTFF11: XWD =226,=29
25800 DEFINE FOO1 $(A,B,C,D)
25900 { BYTE (2)A$0,3,3,3,3,3,3,3,3,3,3,3,3,B,C$D
26000 BYTE (2)A$3,0,3,3,3,3,3,3,3,3,3,3,3,B,C$D
26100 BYTE (2)A$3,3,0,3,3,3,3,3,3,3,3,3,3,B,C$D
26200 BYTE (2)A$3,3,3,0,3,3,3,3,3,3,3,3,3,B,C$D
26300 BYTE (2)A$3,3,3,3,0,3,3,3,3,3,3,3,3,B,C$D
26400 BYTE (2)A$3,3,3,3,3,0,3,3,3,3,3,3,3,B,C$D
26500 BYTE (2)A$3,3,3,3,3,3,0,3,3,3,3,3,3,B,C$D
26600 BYTE (2)A$3,3,3,3,3,3,3,0,3,3,3,3,3,B,C$D
26700 BYTE (2)A$3,3,3,3,3,3,3,3,0,3,3,3,3,B,C$D
26800 BYTE (2)A$3,3,3,3,3,3,3,3,3,0,3,3,3,B,C$D
26900 BYTE (2)A$3,3,3,3,3,3,3,3,3,3,0,3,3,B,C$D
27000 BYTE (2)A$3,3,3,3,3,3,3,3,3,3,3,0,3,B,C$D
27100 BYTE (2)A$3,3,3,3,3,3,3,3,3,3,3,3,0,B,C$D}
27200 DEFINE FOO2
27300 {FOO1(<3,>,1,0,<,1,1,1,1,1,1,1,1,1,1,1,1,1>)
27400 FOO1(<3,>,1,3,<,3,3,3,3,3,3,3,3,3,3,3,3,3>)
27500 FOO1(<3,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,>,0,0)
27600 FOO1(<3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,1,>,0,0)
27700 FOO1(<3,>,1,1,<,0,3,3,3,3,3,3,3,3,3,3,3,3>)
27800 FOO1(<3,>,1,1,<,3,0,3,3,3,3,3,3,3,3,3,3,3>)
27900 FOO1(<3,>,1,1,<,3,3,0,3,3,3,3,3,3,3,3,3,3>)
28000 FOO1(<3,>,1,1,<,3,3,3,0,3,3,3,3,3,3,3,3,3>)
28100 FOO1(<3,>,1,1,<,3,3,3,3,0,3,3,3,3,3,3,3,3>)
28200 FOO1(<3,>,1,1,<,3,3,3,3,3,0,3,3,3,3,3,3,3>)
28300 FOO1(<3,>,1,1,<,3,3,3,3,3,3,0,3,3,3,3,3,3>)
28400 FOO1(<3,>,1,1,<,3,3,3,3,3,3,3,0,3,3,3,3,3>)
28500 FOO1(<3,>,1,1,<,3,3,3,3,3,3,3,3,0,3,3,3,3>)
28600 FOO1(<3,>,1,1,<,3,3,3,3,3,3,3,3,3,0,3,3,3>)
28700 FOO1(<3,>,1,1,<,3,3,3,3,3,3,3,3,3,3,0,3,3>)
28800 FOO1(<3,>,1,1,<,3,3,3,3,3,3,3,3,3,3,3,0,3>)
28900 FOO1(<3,>,1,1,<,3,3,3,3,3,3,3,3,3,3,3,3,0>)
29000 BYTE (2)0,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1
29100 BYTE (2)2,3,3,3,3,3,3,3,3,3,3,3,3,3,0,1,3,3,3,3,3,3,3,3,3,3,3,3,3
29200 BYTE (2)0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1
29300 BYTE (2)2,3,3,3,3,3,3,3,3,3,3,3,3,3,1,0,3,3,3,3,3,3,3,3,3,3,3,3,3}
29400 FOO2
29500 BYTE (2)3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2
29600
29700 CTFF12: XWD =564,=29
29800 FOO2
29804 DEFINE FOO3(Q,NQ,FUD)
29808 {FOO1(<0,1,1,1,1,1,1,1,1,1,1,1,1,1,Q,NQ,1,1,1,1,1,1,1,1,1,1,1,1,1
29812 BYTE (2)2,>,3,3,<,FUD>)}
29816 DEFINE FOO4 (Q,NQ)
29820 {FOO3(Q,NQ,<0,3,3,3,3,3,3,3,3,3,3,3,3>)
29824 FOO3(Q,NQ,<3,0,3,3,3,3,3,3,3,3,3,3,3>)
29828 FOO3(Q,NQ,<3,3,0,3,3,3,3,3,3,3,3,3,3>)
29832 FOO3(Q,NQ,<3,3,3,0,3,3,3,3,3,3,3,3,3>)
29836 FOO3(Q,NQ,<3,3,3,3,0,3,3,3,3,3,3,3,3>)
29840 FOO3(Q,NQ,<3,3,3,3,3,0,3,3,3,3,3,3,3>)
29844 FOO3(Q,NQ,<3,3,3,3,3,3,0,3,3,3,3,3,3>)
29848 FOO3(Q,NQ,<3,3,3,3,3,3,3,0,3,3,3,3,3>)
29852 FOO3(Q,NQ,<3,3,3,3,3,3,3,3,0,3,3,3,3>)
29856 FOO3(Q,NQ,<3,3,3,3,3,3,3,3,3,0,3,3,3>)
29860 FOO3(Q,NQ,<3,3,3,3,3,3,3,3,3,3,0,3,3>)
29864 FOO3(Q,NQ,<3,3,3,3,3,3,3,3,3,3,3,0,3>)
29868 FOO3(Q,NQ,<3,3,3,3,3,3,3,3,3,3,3,3,0>)}
29900 FOO4(0,1)
30100 BYTE (2)3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2
30200 CTFF13: XWD =564,=29
30300 FOO2
30400 FOO4(1,0)
30600 BYTE (2)3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2
30700
30800
30900
31000 CTS04: BYTE (6)1,1,2,2,3,1
31100 BYTE (6)4,2,5,1,6,2
31200 BYTE (6)9,1,8,2,=11,1
31300 BYTE (6)=10,2,=13,1,=12,2
31400 0
31500
31600 CTS00: BYTE (6) 1,1,2,2,3,=14
31700 BYTE (6) 4,1,5,2,6,=14
31800 BYTE (6) =10,1,=9,2,=8,=14
31900 BYTE (6) =13,1,=12,2,=11,=14
32000 0
32100 CTS133: BYTE (6)1,1,2,2,3,3,4,4,5,5,6,6
32200 BYTE (6)7,7,=10,=10,=11,=11,=12,=12,=13,=13,=14,8
32300 BYTE (6)=15,=9,=9,=14
32400 0
32500
32600 CTS10: BYTE (6) 1,1,2,2,=13,3,=12,=14,3,1,4,2,5,3,6,=14,=11,1,=10,2,=9,3,=8,=14
32700 0
32800 CTS11: BYTE (6)1,1,2,2,=13,3,=14,5,3,1,4,2,5,3,6,5,=11,1,=10,2,=9,3,=8,5
32900 0
33000 CTS20: BYTE (6) 1,1,2,2,4,3,5,4,6,=14,=13,1,=12,2,=10,3,=9,4,=8,=14
33100 0
33200
33300 CTS74: BYTE (6)1,3,2,2,3,1,4,4,5,5,6,6
33400 BYTE (6)=8,6,=9,5,=10,4
33500 BYTE (6)=11,1,=12,2,=13,3
33600 0
33700 CTS112: BYTE (6)1,3,2,5,3,4,4,1,5,6,6,7
33800 BYTE (6)7,7,=9,6,=10,1,=11,4,=12,5,=13,3
33900 BYTE (6)=14,2,=15,2
34000
34100 CT153: XWD =10,=15
34200 BYTE (2)3,1,3,3,3,3,3,0,3,3,3,3,3,3,3
34300 BYTE (2)3,0,0,3,3,3,0,0,3,3,3,3,3,3,0
34400 BYTE (2)3,0,0,3,3,3,1,1,3,3,3,3,3,3,0
34500 BYTE (2)3,0,0,3,3,0,3,0,3,3,3,3,3,3,1
34600 BYTE (2)3,0,0,3,3,1,3,1,3,3,3,3,3,3,1
34700 BYTE (2)3,0,1,3,0,3,3,0,3,3,3,3,3,3,0
34800 BYTE (2)3,0,1,3,1,3,3,1,3,3,3,3,3,3,0
34900 BYTE (2)3,0,1,0,3,3,3,0,3,3,3,3,3,3,1
35000 BYTE (2)3,0,1,1,3,3,3,1,3,3,3,3,3,3,1
35100 BYTE (2)3,2,2,2,3,3,3,2,3,3,3,3,3,3,2
35200
35300 ;JK FLIP-FLOPS
35400 CTF112: XWD =24,=8
35500 BYTE(2)3,0,1,3,3,3,1,0
35600 BYTE(2)3,1,0,3,3,3,0,1
35700 BYTE(2)3,0,0,3,3,3,1,1
35800 BYTE(2)0,1,1,0,3,3,0,1
35900 BYTE(2)2,3,3,1,0,0,0,1
36000 BYTE(2)0,1,1,0,3,3,1,0
36100 BYTE(2)2,3,3,1,0,0,1,0
36200 BYTE(2)0,1,1,0,3,3,0,1
36300 BYTE(2)2,3,3,1,1,1,1,0
36400 BYTE(2)0,1,1,0,3,3,1,0
36500 BYTE(2)2,3,3,1,1,1,0,1
36600 BYTE(2)0,1,1,0,3,3,0,1
36700 BYTE(2)2,3,3,1,0,1,3,3
36800 BYTE(2)0,1,1,0,3,3,1,0
36900 BYTE(2)2,3,3,1,1,0,3,3
37000 BYTE(2)0,1,1,1,3,3,0,1
37100 BYTE(2)2,3,3,3,3,3,0,1
37200 BYTE(2)0,1,1,1,3,3,1,0
37300 BYTE(2)2,3,3,3,3,3,1,0
37400 BYTE(2)0,1,1,0,3,3,0,1
37500 BYTE(2)2,3,3,0,3,3,0,1
37600 BYTE(2)0,1,1,0,3,3,1,0
37700 BYTE(2)2,3,3,0,3,3,1,0
37800 BYTE(2)3,2,2,2,2,2,2,2
37900
38000 S174ST: XWD 3,5
38100 BYTE (6)0,2,3,0,0,-1
38200 BYTE (6)0,0,0,-1,0,0
38300 0
38400 BYTE (6)3,0,0,0,0,-1
38500 BYTE (6)0,0,0,-1,0,2
38600 0
38700 BYTE (6)0,0,0,0,0,-1
38800 BYTE (6)0,3,2,-1,0,0
38900 0
39000 BYTE (6)0,0,0,0,0,-1
39100 BYTE (6)2,0,0,-1,0,0
39200 BYTE (6)0,0,0,0,0,3
39300 BYTE (6)0,0,0,0,0,-1
39400 BYTE (6)0,0,0,-1,0,0
39500 BYTE (6)0,0,0,2,3,00
39600
39700 S175ST: XWD 3,3
39800 BYTE (6)3,4,0,0,0,-1
39900 BYTE (6)0,0,0,-1,0,2
40000 0
40100 BYTE (6)0,0,0,0,0,-1
40200 BYTE (6)4,3,2,-1,0,0
40300 0
40400 BYTE (6)0,0,0,0,0,-1
40500 BYTE (6)0,0,0,-1,0,0
40600 BYTE (6)0,0,0,2,3,4
40700
40800 S157ST: XWD 3,3
40900 BYTE (6)3,2,0,0,0,-1
41000 BYTE (6)0,0,0,0,0,4
41100 BYTE (6)0,0,0,-1,0,0
41200 BYTE (6)0,0,0,0,0,-1
41300 BYTE (6)0,2,3,4,0,00
41400 BYTE (6)0,0,0,-1,0,0
41500 BYTE (6)0,0,0, ,0,%!
4!⊗00 B_TE (6)4,0,0,0,0,0
41700 BYTE (6)0,0,0,-1,2,3
41800
41900 CTS174: BYTE (6)1,3,2,5,3,2,9,1,8,6,0,0
42000 CTS175: BYTE (6)1,3,2,5,3,6,4,2,9,1,0,0
42100 CTS158: BYTE (6)1,1,=15,2,2,3,3,4,4,5,0,0
42200
42300 CTF157: XWD 6,6
42400 ; I,A S I I O
42500 ; N D T 0 1
42600 BYTE (2)3,3,1,3,3,0
42700 BYTE (2)3,0,0,0,3,0
42800 BYTE (2)3,0,0,1,3,1
42900 BYTE (2)3,1,0,3,0,0
43000 BYTE (2)3,1,0,3,1,1
43100 BYTE (2)3,2,2,2,2,2
43200
43300 CTF158: XWD 6,6
43400 BYTE (2)3,3,1,3,3,1
43500 BYTE (2)3,0,0,0,3,1
43600 BYTE (2)3,0,0,1,3,0
43700 BYTE (2)3,1,0,3,0,1
43800 BYTE (2)3,1,0,3,1,0
43900 BYTE (2)3,2,2,2,2,2
44000
44100 CTF151: XWD =18,=16
44200 ; I D D D D O O S X C B A D D D D
44300 ; N 3 2 1 0 Y W T X 7 6 5 4
44400 BYTE (2)3,3,3,3,3,0,1,1,3,3,3,3,3,3,3,3
44500 BYTE (2)3,3,3,3,0,0,1,0,3,0,0,0,3,3,3,3
44600 BYTE (2)3,3,3,0,3,0,1,0,3,0,0,1,3,3,3,3
44700 BYTE (2)3,3,0,3,3,0,1,0,3,0,1,0,3,3,3,3
44800 BYTE (2)3,0,3,3,3,0,1,0,3,0,1,1,3,3,3,3
44900 BYTE (2)3,3,3,3,3,0,1,0,3,1,0,0,3,3,3,0
45000 BYTE (2)3,3,3,3,3,0,1,0,3,1,0,1,3,3,0,3
45100 BYTE (2)3,3,3,3,3,0,1,0,3,1,1,0,3,0,3,3
45200 BYTE (2)3,3,3,3,3,0,1,0,3,1,1,1,0,3,3,3
45300 BYTE (2)3,3,3,3,1,1,0,0,3,0,0,0,3,3,3,3
45400 BYTE (2)3,3,3,1,3,1,0,0,3,0,0,1,3,3,3,3
45500 BYTE (2)3,3,1,3,3,1,0,0,3,0,1,0,3,3,3,3
45600 BYTE (2)3,1,3,3,3,1,0,0,3,0,1,1,3,3,3,3
45700 BYTE (2)3,3,3,3,3,1,0,0,3,1,0,0,3,3,3,1
45800 BYTE (2)3,3,3,3,3,1,0,0,3,1,0,1,3,3,1,3
45900 BYTE (2)3,3,3,3,3,1,0,0,3,1,1,0,3,1,3,3
46000 BYTE (2)3,3,3,3,3,1,0,0,3,1,1,1,1,3,3,3
46100 BYTE (2)3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2
46200
00100 FNAM: OUTSTR [ASCIZ/FILE = /]
00200 MOVEI B,
00300 FLOP1: INCHWL C
00400 SUBI C,40
00500 CAIL C,100
00600 SUBI C,40
00700 CAIG C,17
00800 JRST FDON
00900 LSH B,6
01000 OR B,C
01100 JRST FLOP1
01200 FDON: TLNE B,770000
01300 JRST .+4
01400 LSH B,6
01500 TLNN B,770000
01600 JRST .-2
01700 MOVEM B,(A)
01800 ADDI C,40
01900 CAIN C,15
02000 INCHWL C
02100 POPJ P,
02200 MATCH: MOVE D,TYPTB1(C)
02300 CAME A,(D)
02400 JRST NOMAT
02500 TRNN A,376
02600 POPJ P,
02700 CAME B,1(D)
02800 JRST NOMAT
02900 POPJ P,
03000 NOMAT: AOS (P)
03100 SKIPE (D)
03200 AOS (P)
03300 POPJ P,
03400
03500 WRD: SOSG DIB+2
03600 INPUT 1,
03700 ILDB B,DIB+1
03800 POPJ P,
03900
04000 NOFST: 0
04100 PUSH P,A
04200 MOVE A,JOBREL
04300 ADDI A,1
04400 MOVEM A,FSTPNT
04500 ADDI A,1777
04600 CALLI A,11
04700 JRST NOCOR
04800 MOVE A,FSTPNT
04900 ADDI A,2
05000 MOVEM A,-2(A)
05100 CAMGE A,JOBREL
05200 JRST .-3
05300 SETZM -2(A)
05400 MOVE A,NOFST
05500 SUBI A,2
05600 EXCH A,(P)
05700 POPJ P,
05800
05900 HGFIND: HRLZS A ;GET HELLIWELLS GATE # IN LEFT
06000 MOVEI D,777 ;START AT END OF TABLE
06100 HGLOP1: CAML A,HTYPS(D) ;SEARCH BACK UNTIL TABLE IS LESS THAN WHAT WE HAVE
06200 JRST HFND1 ;OK, GO THERE
06300 SUBI D,10
06400 JRST HGLOP1
06500 HFND1: HLLZ E,HTYPS(D) ;GET TABLE ENTRY
06600 CAME E,A ;SEARCH FORWARD FOR EQUAL ENTRY
06700 AOJA D,HFND1
06800 POPJ P,
06900
07000 LRET: HRRZ B,A
07100 LRLP1: SKIPN A,B
07200 POPJ P,
07300 HRRZ B,(A)
07400 FSTRET (A)
07500 JUMPN B,LRLP1
07600 POPJ P,
07700
07800 ;LCOM: COMPARE TWO LISTS. SKIP IF LISTS CONTAIN ALL THE SAME ELEMENTS (IGNORE ORDER)
07900 LCOM: EXCH A,B ;SWITCH LISTS
08000 MOVE C,B ;B IS USED FOR ELEMENTS, HOLD LIST IN C
08100 PUSH P,B ;SAVE B LIST
08200 LCLOP1: TRNN C,-1
08300 JRST LD1 ;LIST EXHAUSTED
08400 MOVE B,1(C) ;GET NEXT ELEMENT
08500 PUSHJ P,LECONT ;IS IT IN LIST A?
08600 JRST LNO1 ;NO, NO EQUAL
08700 MOVE C,(C) ;GET NEXT
08800 JRST LCLOP1
08900 LD1: EXCH A,(P) ;SWITCH LISTS
09000 MOVE C,(P)
09100 LCLOP2: TRNN C,-1
09200 JRST LD2 ;LIST EXHAUSTED
09300 MOVE B,1(C) ;GET NEXT ELEMENT
09400 PUSHJ P,LECONT ;IS IT IN LIST A?
09500 JRST LNO2
09600 MOVE C,(C)
09700 JRST LCLOP2 ;GET NEXT
09800 LD2: POP P,B ;EQUAL, RESTORE POINTERS
09900 AOS (P) ;SKIP
10000 POPJ P,
10100 LNO1: MOVE B,A ;RESTORE POINTERS
10200 POP P,A ;...
10300 POPJ P, ;NOT EQUAL, RETURN
10400 LNO2: POP P,B ;RESTORE POINTERS
10500 POPJ P,
10600
10700 LECONT: PUSH P,A ;SAVE POINTER
10800 TRNN A,-1
10900 JRST LEDON ;LIST EXHAUSTED
11000 CAMN B,1(A) ;IS THIS ELEMENT EQUAL?
11100 JRST LFND ;YES
11200 MOVE A,(A) ;NO, TRY NEXT
11300 JRST LECONT+1 ;LOOP
11400 LEDON: POP P,A ;RESTORE POINTER
11500 POPJ P, ;NOT EQUAL
11600 LFND: POP P,A
11700 AOS (P)
11800 POPJ P,
11900
12000 LEPUT: ;PUT AN ELEMENT (IN B) INTO A LIST (IN A)
12100 PUSHJ P,LECONT ;IS IT ALREADY IN THE LIST?
12200 JRST .+2 ;NO
12300 POPJ P, ;YES, LEAVE
12400 LEPUT1: GETFS (C)
12500 EXCH A,(C) ;GET NEW FSTPNT AND DEPOSIT PNTR TO REST OF LIST
12600 EXCH A,FSTPNT ;DEPOSIT NEW FSTPNT AND GET POINTER TO NEW HEAD OF LIST
12700 MOVEM B,1(A) ;DEPOSIT ELEMENT
12800 POPJ P,
12900
13000 ;LCOP: MAKES, IN A, A COPY OF THE LIST IN D
13100 LCOP: MOVEI A,
13200 JUMPE D,CPOPJ
13300 GETFST (A,C)
13400 PUSH P,D
13500 MOVE T,A
13600 LCLP1: MOVE C,1(D)
13700 MOVEM C,1(T)
13800 HRRZ D,(D)
13900 JUMPE D,LCLP2
14000 GETFST (T1,T2)
14100 HRRZM T1,(T)
14200 MOVE T,T1
14300 JRST LCLP1
14400 LCLP2: SETZM (T)
14500 POP P,D
14600 POPJ P,
14700
14800 GDRV: JRST @.+1
14900 GDST
15000 POPJ P,
15100 GDE: JSR GDRV+1
15200 GDST: HRRZ H,MTYPS(G)
15300 JUMPE H,GDDN1
15400 GLP2: HRRZ J,1(H)
15500 JUMPE J,GDDN2
15600 GLP1: HRRZ B,1(J)
15700 JUMPE B,.+2
15800 JSR GDRV+1
15900 HRRZ J,(J)
16000 JUMPN J,GLP1
16100 GDDN2: HRRZ H,(H)
16200 JUMPN H,GLP2
16300 GDDN1: MOVEI B,
16400 JRST GDE
16500 GDRV2: PUSHJ P,GDRV
16600 JUMPE B,CPOPJ
16700 PUSHJ P,LECONT
16800 JRST GDRV2 ;NO
16900 CPOPJ: POPJ P, ;YES
17000 GDRV1: JRST @.+1
17100 GD1ST
17200 POPJ P,
17300 GDE1: JSR GDRV1+1
17400 GD1ST: PUSHJ P,GDRV2
17500 JUMPE B,GDNONE
17600 MOVEM B,GDSAV#
17700 GLP3: PUSHJ P,GDRV2
17800 JUMPE B,GDDN3
17900 JSR GDRV1+1
18000 JRST GLP3
18100 GDDN3: MOVE B,GDSAV
18200 HRLI B,-1
18300 GDNONE: JRST GDE1
18400
18500 MAKLP: GETFST (A,C)
18600 MOVEM F,(A)
18700 MOVE F,A
18800 GETFST (A,C)
18900 HRRZM A,1(F)
19000 SETZM (A)
19100 MOVEM B,1(A)
19200 MKLP3: SETZM DIDSW#
19300 MOVE Q,F ;GET CURRENT LOOP LIST
19400 MKLP2: SKIPGE D,1(Q) ;THIS ONE DONE?
19500 JRST TDON1 ;YES
19600 MOVE A,E
19700 HRRZ G,1(D) ;GET END-SO-FAR GATE
19800 MKLP1: PUSHJ P,GDRV1 ;GET ONE OF THE GATES DRIVEN BY IT
19900 JUMPE B,ERR1 ;NONE?
20000 SETOM DIDSW
20100 JUMPL B,MKLAST ;LAST ONE?
20200 PUSHJ P,LCOP ;NO, MAKE COPY OF THIS LOOP
20300 PUSHJ P,LEPUT1 ;PUT NEW THING IN IT
20400 GETFST (B,C)
20500 MOVEM F,(B) ;PUT NEW LIST ON LIST
20600 HRRZM A,1(B) ;...
20700 MOVE F,B
20800 HRRZ B,1(A) ; GET NEWEST ELEMENT
20900 HRRZ A,(A) ;GET REST OF LIST
21000 PUSHJ P,LECONT ;IS LOOP CLOSED?
21100 SKIPA ;NO
21200 HRROS 1(F) ;YES, MARK AS DONE
21300 MOVE A,E
21400 JRST MKLP1
21500 MKLAST: MOVE A,D
21600 HRRZS B
21700 PUSHJ P,LEPUT1 ;PUT NEW THIN INTO LIST
21800 HRRZM A,1(Q) ;UPDATE LIST POINTER
21900 HRRZ A,(A) ;GET REST OF LIST
22000 PUSHJ P,LECONT ;IS LOOP CLOSED?
22100 SKIPA ;NO
22200 HRROS 1(Q) ;YES, MARK AS DONE
22300 MKLP4: HRRZ Q,(Q) ;GO TO NEXT LIST
22400 JUMPN Q,MKLP2 ;LOOP
22500 MKLP5: SKIPE DIDSW ;DID WE UPDATE ANYTHING?
22600 JRST MKLP3 ;YES, TRY AGAIN
22700 HRLI C,-2 ;NO, MARK AS ALL DONE
22800 HLLM C,1(F)
22900 POPJ P,
23000 TDON1: TLNE D,1 ;THIS ONE ONLY OR ALL BEYOND HERE DONE?
23100 JRST MKLP4 ;THIS ONE ONLY DONE, TRY SOME MORE
23200 JRST MKLP5 ;ALL BEYOND HERE DONE, TRY AGAIN.
23300
23400 ERR1: OUTSTR [ASCIZ /THERE IS A GATE WHO DRIVES NO-ONE IN THE LIST
23500 OF GATES WHO DRIVE SOMEONE/]
23600 JRST 4,.
23700
23800 ISINLP: MOVE D,F
23900 HRRZ A,1(D)
24000 PUSHJ P,LECONT
24100 JRST .+3
24200 AOS (P)
24300 POPJ P,
24400 HRRZ D,(D)
24500 JUMPN D,ISINLP+1
24600 POPJ P,
24700
24800 LEQ: MOVE D,B
24900 LOPP1: MOVE G,1(D)
25000 CAME G,1(C)
25100 POPJ P,
25200 HRRZ D,(D)
25300 HRRZ C,(C)
25400 JUMPE D,.+3
25500 JUMPN C,LOPP1
25600 POPJ P,
25700 SKIPN C
25800 AOS (P)
25900 POPJ P,
26000 ANYEQ: JUMPE A,CPOPJ
26100 PUSH P,A
26200 AEQL1: HRRZ C,1(A)
26300 PUSHJ P,LEQ ;LISTS EQUAL?
26400 JRST AEQN1 ;NO
26500 POP P,A ;YES
26600 CPOPJ1: AOS (P)
26700 POPJ P,
26800 AEQN1: HLRZ G,1(A) ;GET LENGTH
26900 CAIE G,2 ;=2?
27000 JRST AEQN2 ;NO
27100 HRRZ C,1(A)
27200 MOVE G,1(C) ;GET FIRST ELEMENT
27300 MOVE C,(C)
27400 MOVE C,1(C) ;GET SECOND ELEMENT
27500 CAME C,1(B) ;FIRST = SECOND?
27600 JRST AEQN2 ;NO
27700 HRRZ D,(B)
27800 CAME G,1(D) ;SECOND = FIRST?
27900 JRST AEQN2 ;NO
28000 POP P,A
28100 AOS (P)
28200 POPJ P,
28300 AEQN2: HRRZ A,(A)
28400 JUMPN A,AEQL1
28500 POP P,A
28600 POPJ P,
28700
28800 CONSOL: MOVE D,F
28900 CSLOP1: HRRZ G,1(D) ;GET A LOOP
29000 MOVEI T,1 ;INI COUNT
29100 HRRZ H,1(G) ;GET FIRST GATE (LOOP CLOSING)
29200 MOVE A,G
29300 MOVE G,A
29400 HRRZ A,(G)
29500 CAME H,1(A) ;END OF LOOP?
29600 AOJA T,.-3 ;NO
29700 SETZM (G)
29800 PUSHJ P,LRET ;RETURN END OF LIST TO FREE STRG.
29900 HRLM T,1(D) ;DEPOSIT COUNT
30000 HRRZ D,(D) ;GET NEXT LOOP
30100 JUMPN D,CSLOP1
30200 MOVEI A, ;INIT NEW LIST
30300 CSLOP2: MOVE B,1(F) ;GET NEXT LOOP
30400 PUSHJ P,ANYEQ ;IS IT ALREADY IN "A" LIST?
30500 JRST [PUSHJ P,LEPUT1 ;NO, PUT IT IN
30600 JRST CSCN1]
30700 PUSH P,A
30800 MOVE A,B
30900 PUSHJ P,LRET
31000 POP P,A
31100 CSCN1: HRRZ C,(F)
31200 FSTRET (F)
31300 MOVE F,C
31400 JUMPN F,CSLOP2
31500 MOVE F,A
31600 POPJ P,
31700
31800 IFN PRTSW,
31900 {PRT: INIT 5,1
32000 SIXBIT /LPT/
32100 XWD LOB,0
32200 JRST 4,.
32300 MOVE Q,JOBFF
32400 MOVEI T1,PRTBUF
32500 MOVEM T1,JOBFF
32600 OUTBUF 5,1
32700
32800 DEFINE PRTC (A)
32900 { MOVEI T1,A
33000 PUSHJ P,PRT101}
33100 DEFINE PRTCRL
33200 { PRTC (15)
33300 PRTC (12)}
33400
33500 MOVEI A,777
33600 PRTL2: MOVE T,A
33700 PUSHJ P,PRTOCT
33800 PRTC (40)
33900 PUSHJ P,PRT101
34000 HLRZ T,MTYPS(A)
34100 PUSHJ P,PRTOCT
34200 PRTC (11)
34300 HRRZ T1,HTYPS(A)
34400 HRRZ T,TYPTB1(T1)
34500 PUSHJ P,PRTASC
34600 PRTCRL
34700 SUBI A,1
34800 SKIPE HTYPS(A)
34900 JRST PRTL2
35000 PRTCRL
35100 MOVE A,CEPNUM
35200 SOJL A,PRTNI
35300 PRTL1: HLRZ T,CEPINS(A)
35400 PRTC ("P")
35500 ADDI T,404020
35600 PRTC (<"(">)
35700 PUSHJ P,PRTSIX
35800 PRTC (<")">)
35900 PRTC (40)
36000 PUSHJ P,PRT101
36100 HRRZ T,CEPPIN(A)
36200 PUSHJ P,PRTOCT
36300 PRTC (11)
36400 HRRZ B,CEPINS(A)
36500 PUSHJ P,PRTIL
36600 PRTCRL
36700 SOJGE A,PRTL1
36800 PRTCRL
36900 PRTNI: PRTCRL
37000 MOVEI A,777
37100 PRTL3: HRRZ D,MTYPS(A)
37200 JUMPE D,PRTNO
37300 PRTL4: MOVE T,A
37400 PUSHJ P,PRTOCT
37500 PRTC(<",">)
37600 HLRZ T,1(D)
37700 PUSHJ P,PRTDEC
37800 PRTC (40)
37900 PUSHJ P,PRT101
38000 HLRZ T,(D)
38100 PUSHJ P,PRTOCT
38200 PRTC (11)
38300 HRRZ B,1(D)
38400 PUSHJ P,PRTIL
38500 PRTCRL
38600 HRRZ D,(D)
38700 JUMPN D,PRTL4
38800 PRTNN: PRTCRL
38900 SUBI A,1
39000 SKIPE HTYPS(A)
39100 JRST PRTL3
39200 RELEAS 5,
39300 MOVEM Q,JOBFF
39400 POPJ P,
39500 PRTNO: MOVE T,A
39600 PUSHJ P,PRTOCT
39700 MOVEI T,[ASCIZ /, NO USED OUTPUTS/]
39800 PUSHJ P,PRTASC
39900 JRST PRTNN
40000
40100 LOB: BLOCK 3
40200 PRTBUF: BLOCK 500
40300
40400 DEFINE PRTR $(ARG)
40500 {PRT$ARG: JUMPE T,PRTZER
40600 IDIVI T,ARG
40700 JUMPE T,.+4
40800 HRLM T1,(P)
40900 PUSHJ P,PRT$ARG
41000 HLRZ T1,(P)
41100 ADDI T1,60
41200 PRT$ARG$1: SOSG LOB+2
41300 OUTPUT 5,
41400 IDPB T1,LOB+1
41500 POPJ P,}
41600 PRTOCT:
41700 PRTR(10)
41800 PRTDEC:
41900 PRTR (12)
42000 PRTSIX: JUMPE T,CPOPJ
42100 MOVEI T1,
42200 ROTC T,6
42300 JUMPE T1,PRTSIX
42400 ADDI T1,40
42500 PUSHJ P,PRT101
42600 JRST PRTSIX
42700 PRTASC: HRLI T,440700
42800 ILDB T1,T
42900 JUMPE T1,CPOPJ
43000 PUSHJ P,PRT101
43100 JRST PRTASC+1
43200 PRTZER: PRTC("0")
43300 POPJ P,
43400 PRTIL: JUMPE B,CPOPJ
43500 HRRZ T,1(B)
43600 JUMPN T,PRTA1
43700 PRTC ("P")
43800 PRTC (<"(">)
43900 HLRZ T,1(B)
44000 ADDI T,404020
44100 PUSHJ P,PRTSIX
44200 PRTC (<")">)
44300 JRST PRTA2
44400 PRTA1: PUSHJ P,PRTOCT
44500 PRTC(<",">)
44600 HLRZ T,1(B)
44700 PUSHJ P,PRTDEC
44800 PRTA2: HRRZ B,(B)
44900 JUMPE B,CPOPJ
45000 PRTC (<";">)
45100 PRTC (40)
45200 JRST PRTIL+1
45300 }
45400
45500 ;REPLAC: REPLACES ALL REFERENCES TO ONE GATE WITH ANOTHER
45600 ;CALL WITH: GATE # IN D, REPL TYPE IN E, TABLE PNTR IN F.
45700
45800 REPLAC: SETZM SEENSW#
45900 MOVE G,CEPNUM
46000 SOJL G,CEDON1 ;NO DIRECT INPUT PINS?
46100 HRRZ A,CEPINS(G);GET LIST OF INPUT
46200 PUSHJ P,DOREPL ;CHECK AND REPLACE
46300 SOJGE G,.-2
46400 CEDON1: MOVEI G,777
46500 RLOPP2: SKIPN HTYPS(G) ;DONE?
46600 JRST RDON1 ;YES
46700 HRRZ H,MTYPS(G) ;GET OUTPUT POINTER
46800 JUMPE H,RDON2 ;NONE?
46900 RLOPP1: HRRZ A,1(H) ;GET LIST OF INPUTS
47000 PUSHJ P,DOREPL ;DO THE REPLACE
47100 HRRZ H,(H) ;GET NEXT OUTPUT
47200 JUMPN H,RLOPP1 ;LOOP
47300 RDON2: SOJA G,RLOPP2
47400 RDON1: HRRZ H,MTYPS(D) ;GET OUTPUT LIST FOR GATE TO REPLACE
47500 MOVEI G,MTYPS(D);POINTER TO POINTER
47600 JUMPE H,RDON3
47700 RLOPP3: HLRZ T,1(H) ;GET OUTPUT PIN #
47800 PUSHJ P,MAKBP ;MAKE BYTE POINTER
47900 LDB T,T1 ;GET REPLACEMENT PIN #
48000 JUMPE T,NORO ;DON'T REPLACE THIS ONE IF REPL. PIN # IS 0
48100 SKIPN SEENSW ;HAS A PLACE BEEN MADE?
48200 PUSHJ P,MAKPLC ;NO, MAKE ONE
48300 HRRZ Q,MTYPS(C) ;GET NEW OUTPUT POINTER LIST
48400 EXCH Q,(H) ;PUT INTO NEW LIST AND REMOVE FROM OLD
48500 HLLM Q,(H) ;...
48600 HRRM H,MTYPS(C) ;...
48700 HRRM Q,(G) ;...
48800 HRLM T,1(H) ;PUT IN NEW PIN #
48900 HRRZ H,(G) ;GET NEXT POINTER
49000 JUMPN H,RLOPP3
49100 RDON3: POPJ P,
49200 NORO: MOVE G,H
49300 HRRZ H,(G)
49400 JUMPN H,RLOPP3
49500 POPJ P,
49600 MAKPLC: SETOM SEENSW
49700 MOVE C,D
49800 SKIPE HTYPS(C) ;FIND A PLACE
49900 SOJA C,.-1
50000 HRROM E,HTYPS(C)
50100 SETZM MTYPS(C)
50200 POPJ P,
50300 MAKBP: SUBI T,1
50400 IDIVI T,6
50500 IMULI T1,6
50600 ROT T1,-6
50700 TLO T1,600+T
50800 OR T1,F
50900 POPJ P,
51000 DOREPL: JUMPE A,CPOPJ
51100 HRRZ T,1(A) ;GET GATE #
51200 CAMN T,D ;IS IT THE ONE?
51300 JRST DRYES ;YES
51400 DRCON: HRRZ A,(A) ;GET NEXT
51500 JUMPN A,DOREPL+1
51600 POPJ P,
51700 DRYES: HLRZ T,1(A) ;GET PIN #
51800 PUSHJ P,MAKBP ;MAKE A BYTE POINTER
51900 LDB T,T1 ;GET REPLACEMENT PIN #
52000 JUMPE T,DRCON ;DON'T REPLACE IF 0
52100 CAIE T,77 ;IS IT -1?
52200 JRST DRC1 ;NO
52300 GETFST (T1,T)
52400 MOVE T,(A) ;YES, MAKE NEW ENTRY AND INSTERT IT
52500 MOVEM T,(T1) ;...
52600 HRRM T1,(A) ;...
52700 HLRZ T,1(A) ;GET PIN #
52800 HRRZ A,T1 ;GET POINTER TO NEW ENTRY
52900 DRC1:
53000 HRLM T,1(A) ;DEPOSIT NEW PIN #
53100 SKIPN SEENSW ;IS THERE A PLACE?
53200 PUSHJ P,MAKPLC ;NO, MAKE ONE
53300 HRRM C,1(A) ;DEPOSIT NEW GATE #
53400 JRST DRCON
53500
53600 REMOUT: HRRZ C,MTYPS(T1);GET T1 OUTPUT LIST
53700 SKIPE (C) ;MORE THAN ONE OUTPUT?
53800 JRST ERR2 ;YES
53900 MOVEI G,1(C)
54000 HRRZ H,1(C) ;POINTER TO INPUT LIST
54100 JUMPE H,CPOPJ
54200 RELP: HRRZ Q,1(H) ;GET GATE #
54300 CAIE Q,(T) ;SAME GATE AS T?
54400 JRST RENO ;NO
54500 HLL T,1(H) ;YES, SAVE PIN #
54600 HRRZ Q,(H)
54700 HRRM Q,(G) ;UNLINK THIS ONE
54800 FSTRET (H)
54900 MOVE H,Q ;GO TO NEXT INPUT
55000 JRST .+3
55100 RENO: MOVE G,H ;GO TO NEXT
55200 HRRZ H,(H)
55300 JUMPN H,RELP ;DONE?
55400 HRRZ G,1(C) ;YES, ANY INPUTS LEFT?
55500 JUMPN G,CPOPJ ;YES
55600 HLLZS MTYPS(T1) ;NO, REMOVE PINTER
55700 POPJ P,
55800 ERR2: OUTSTR [ASCIZ /GATE WITH MORE THAN ONE OUTPUT
55900 /]
56000 JRST 4,.
56100
56200 NOENT: OUTSTR [ASCIZ /CAN'T ENTER FILE
56300 /]
56400 JRST EC1
56500 NOLUP: OUTSTR [ASCIZ /CAN'T FIND INPUT FILE
56600 /]
56700 JRST STRT
56800 NOCOR: OUTSTR [ASCIZ /CAN'T GET ENOUGH CORE
56900 TYPE ANY KEY TO TRY AGAIN
57000 /]
57100 INCHRW
57200 JRST NOFST+2
57300
57400 FCHK: HRRZ T,1(A) ;GET GATE #
57500 HRRZ T1,HTYPS(T);GET TYPE
57600 MOVE T2,TYPTB3(T1);GET FLAGS
57700 TLNE T2,FFBIT ;IS IT A FF
57800 POPJ P, ;YES, RETURN
57900 HRRZ A,(A) ;GO TO NEXT ELEMENT
58000 JUMPN A,FCHK ;LOOP
58100 OUTSTR [ASCIZ /ILLEGAL LOOP IN THIS DRWG.
58200 I CONTINUE ANYWAY.....
58300 /]
58400 POPJ P,
58500
58600 WOUT: SOSG DOB+2
58700 OUTPUT 2,
58800 IDPB Q,DOB+1
58900 POPJ P,
59000
59100 GMJW1: AOS (P)
59200 HRRZ E,1(D) ;GET GATE #
59300 JUMPE E,.+3 ;CE PIN?
59400 HLLZ E,MTYPS(E) ;GET MJW #
59500 POPJ P,
59600 HRRZ D,(D) ;CE PIN, IGNORE
59700 JUMPN D,GMJW1+1
59800 SOS (P)
59900 POPJ P,
60000
60100 MIGAT: MOVSS E
60200 EXCH Q,IGRF(E) ;GET CURRENT ENTRY FOR GATE
60300 JUMPE Q,.+4 ;NONE SO FAR?
60400 PUSHJ P,WOUT ;OUTPUT CURRENT THING
60500 HRRZ Q,C ;GET LINK
60600 ADDI C,1
60700 HRL Q,A
60800 EXCH Q,IGRF(E)
60900 MOVSS E
61000 POPJ P,
61100
61200 GBP: SUBI J,1
61300 IDIVI J,=18 ;CONV TO BYTE POINTER
61400 HRLI J,200
61500 ADD J,WB#
61600 LSH J1,1
61700 MOVNS J1 ;...
61800 ADDI J1,=34
61900 DPB J1,[POINT 6,J,5];...
62000 POPJ P,
62100
62200 NOU: SOJLE T1,.+3
62300 IBP E
62400 SOJG T1,.-1
62500 NOU2: SETZM SKPFLG
62600 MOVE T1,WB ;GET INIT BYTE
62700 HRLI T1,420200 ;...
62800 LDB T1,T1 ;...
62900 JUMPN T1,.+2 ;INIT FOLLOWS?
63000 SETOM SKPFLG# ;YES, SKIP IT TOO
63100 PUSHJ P,MCLR
63200 JRST FWL11
63300
63400 MOUT: MOVE T1,WB
63500 HRLI T1,420200
63600 LDB T1,T1
63700 JUMPE T1,MOUTL1
63800 PUSH P,T
63900 MOVEI T1,WBUF
64000 MOUTL2: MOVE Q,(T1)
64100 PUSHJ P,WOUT
64200 ADDI T1,1
64300 SOJG T,MOUTL2
64400 CAMLE T1,WB
64500 JRST .+3
64600 MOVE T,(P)
64700 JRST MOUTL2
64800 POP P,T
64900 MCLR: MOVEI T1,WBUF
65000 MOVEM T1,WB
65100 POPJ P,
65200 MOUTL1: ADDM T,WB
65300 POPJ P,
65400
65500 HEDO: MOVEI E,
65600 PUSH P,[0]
65700 MOVEI C,1
65800 HED5: HRRZ D,1(B) ;GET FIRST ENTRY IN NODE
65900 JUMPE D,HED4
66000 HED3: HRRZ F,HTYPS(D) ;GET GATE TYPE
66100 MOVE F,TYPTB3(F);GET FLAGS
66200 TLNE F,FFSTP ;STOP HERE?
66300 JRST HED1 ;YES
66400 TLNN F,FFG1+FFG2;A FF WE ARE LOOKING FOR?
66500 JRST HED2 ;NO
66600 GETFST (Q,G)
66700 MOVEM E,(Q)
66800 MOVE E,Q
66900 HLRZ Q,1(B)
67000 MOVEI G,1
67100 TLNE F,FFG2
67200 MOVEI G,=14
67300 HRLI D,1
67400 CAMG Q,G
67500 HRLI D,
67600 MOVEM D,1(E)
67700 HRLM C,(E)
67800 JRST HED1
67900 HED2: HRL D,C ;GET LEVEL COUNT
68000 PUSH P,D
68100 HED1: HRRZ F,(B)
68300 SKIPE B,F
68400 JRST HED5
68500 HED4: POP P,D
68600 JUMPE D,HEDS
68700 HLRZ C,D
68800 ADDI C,1
68900 HRRZ B,MTYPS(D)
69000 JUMPE B,HED4
69100 HRRZ B,1(B)
69200 JRST HED5
69300 HEDS: JUMPE E,CPOPJ
69400 PUSH P,E
69500 SKIPN 1(E)
69600 JRST HED13
69700 SETZB H,J
69800 SETZB F,G
69850 HRRZ D,1(E)
69900 HED12: MOVE C,1(E)
70100 CAIE D,(C)
70200 JRST HED10
70250 SETZM 1(E)
70300 HLRZ Q,(E)
70400 TLNN C,1
70500 JRST HED8
70600 JUMPE H,HED9
70700 CAMGE Q,H
70800 MOVE H,Q
70900 CAMLE Q,J
71000 MOVE J,Q
71100 JRST HED10
71200 HED9: MOVE H,Q
71300 MOVE J,Q
71400 JRST HED10
71500 HED8: JUMPE F,HED11
71600 CAMGE Q,F
71700 MOVE F,Q
71800 CAMLE Q,G
71900 MOVE G,Q
72000 JRST HED10
72100 HED11: MOVE G,Q
72200 MOVE F,Q
72300 HED10: HRRZ E,(E)
72400 JUMPN E,HED12
72500 JUMPE H,HED13
72600 JUMPE F,HED13
72700 MOVEI Q,
72800 CAMGE J,F
72900 MOVEI Q,1
73000 CAMGE G,H
73100 MOVEI Q,2
73200 ORM Q,QTYPS(D)
73300 HED13: POP P,E
73400 HRRZ F,(E)
73500 FSTRET (E)
73600 MOVE E,F
73700 JUMPN E,HEDS
73800 POPJ P,
73900
00100 ST: PUSHJ P,WRD
00200 JUMPE B,STDON
00300 MOVE A,B
00400 MOVEI B,
00500 TRNE A,376
00600 PUSHJ P,WRD
00700 MOVEI C,0
00800 LOP1: PUSHJ P,MATCH
00900 JRST MAT1
01000 JRST NOTHER
01100 AOJA C,LOP1
01200 MAT1: PUSHJ P,WRD
01300 MOVSS B
01400 HRR B,C
01500 MOVEI C,HTYPS+777
01600 LOP2: CAML B,(C)
01700 JRST FND1
01800 SUBI C,10
01900 JRST LOP2
02000 FND1: CAMLE B,(C)
02100 AOJA C,FND1
02200 CAMN B,(C)
02300 JRST STQ
02400 MOVE D,[XWD HTYPS+1,HTYPS]
02500 BLT D,-2(C)
02600 MOVEM B,-1(C)
02700 STQ: PUSHJ P,WRD
02800 JRST ST
02900 NOTHER: OUTSTR [ASCIZ /UNKNOWN GATE ID: /]
03000 OUTSTR A
03100 JRST 4,.
03200 STDON:
03300 SLOP1: SETZM GOTOP#
03400 SETZM GOTPIN#
03500 MOVEI H, ;INIT LIST POINTER
03600 GETFST (C,D)
03700 SLOP2: PUSHJ P,WRD
03800 JUMPE B,SDON1
03900 HLRE A,B ;GET HELLIWELLS GATE NAME
04000 JUMPLE A,ITEPIN ;JUMP IF EDGE CON. PIN
04100 PUSHJ P,HGFIND ;GET MY GATE NAME
04200 HRRZ E,HTYPS(D) ;GET TYPE ENTRY FOR GATE
04300 MOVE F,[XWD 100+E,TYPTB2];GET BYTE POINTER INTO TYPE TABLE
04400 DPB B,[POINT 6,F,5];DEPOSIT POSITION FIELD (PIN #)
04500 LDB F,F ;GET ENTRY
04600 JUMPN F,ITOUT ;JUMP IF OUTPUT PIN
04700 SCON1: GETFST (F,G)
04800 HRRM D,1(F) ;DEPOSIT GATE #
04900 HRLM B,1(F) ;DEPOSIT PIN #
05000 MOVEM H,(F) ;DEPOSIT POINTER TO WHAT WE HAVE SO FAR
05100 MOVE H,F ;NEW POINTER TO LIST
05200 JRST SLOP2 ;GET NEXT ENTRY
05300 ITOUT: MOVE A,MTYPS(D) ;GET CURRENT OUTPUT PIN LIST FOR THIS GATE
05400 SETOM GOTOP ;SET OUTPUT FLAG
05500 GETFST (F,G)
05600 MOVEM C,1(F) ;DEPOSIT POINTER TO LIST WE WILL HAVE AT END
05700 MOVEM F,MTYPS(D);DEPOSIT POINTER TO NEW START OF OUTPUT PIN LIST
05800 MOVEM A,(F) ;DEPOSIT POINTER TO REST OF LIST
05900 HRLM B,1(F) ;DEPOSIT PIN #
06000 JRST SLOP2 ;GET NEXT ENTRY
06100 ITEPIN: SKIPE GOTPIN ;GOT AN EDGE PIN YET?
06200 JRST GPIN1 ;YES
06300 MOVEM B,GOTPIN ;NO, SAVE THIS ONE
06400 JRST SLOP2 ;AND GET NEXT ENTRYY
06500 GPIN1: MOVEI D, ;GOT ONE ALREADY,...
06600 JRST SCON1 ;JUST PUT THIS ONE IN THE LIST
06700 SDON1: SKIPE GOTPIN ;DO WE HAVE A EDGE PIN?
06800 JRST GOTED ;YES
06900 JUMPE H,SDON2 ;NO NODE, ALL DONE
07000 SCON2: MOVE A,(H) ;NO, PUT FIRST ENTRY IN LIST IN THE PLACE EVERYONE POINTS
07100 MOVEM A,(C)
07200 MOVE A,1(H)
07300 MOVEM A,1(C)
07400 FSTRET (H)
07500 SKIPN GOTOP ;WAS THERE AN OUTPUT PIN?
07600 JRST 4,. ;NO, ERROR. NO OUTPUT OR CARD EDGE PIN.
07700 JRST SLOP1 ;GET NEXT NODE
07800 GOTED: SKIPN GOTOP ;GOT AN OUTPUT PIN?
07900 JRST GNOP ;NO
08000 MOVE A,GOTPIN ;GET PIN TO PUT INTO LIST
08100 HRLZM A,1(C) ;DEPOSIT PIN #
08200 MOVEM H,(C) ;DEPOSIT POINTER TO REST OF LIST
08300 JRST SLOP1 ;
08400 GNOP: AOS B,CEPNUM ;GET POINTER TO NEXT CARD EDGE TABLE ENTRY
08500 MOVE A,GOTPIN ;GET SAVED PIN #
08600 HRLZM A,CEPINS-1(B);SAVE PIN #
08700 HRRM C,CEPINS-1(B);SAVE POINTER TO NODE
08800 SETOM GOTOP ;DON'T FIND ERRONEOUS ERROR
08900 JRST SCON2
09000 ;AT THIS POINT WE REPLACE ALL BODIES WITH MULTIPLE SECTIONS WITH SINGLE SECTIONS
09100 SDON2:
09200 MOVEI D,777
09300 SKIPE HTYPS(D) ;LAST ONE?
09400 SOJA D,.-1 ;NO, LOOP
09500 MOVEM D,DSAV1# ;SAVE END COND.
09600 MOVEI D,777
09700 RLOP1: HRRZ E,HTYPS(D) ;GET TYPE OF GATE
09800 MOVE T2,TYPTB3(E);GET FLAGS AND ADDRS
09900 TLNN T2,SECTN ;DO A SECTION REPLACEMENT?
10000 JRST RRDON1 ;NO
10100 MOVEI F,1(T2) ;GET POINTER TO REPLACEMENT TABLE
10200 MOVS T2,(T2) ;GET COUNT,,LENGTH
10300 RLOP2: PUSHJ P,REPLAC ;DO THE REPLACEMENT
10400 ADDI F,(T2) ;GO TO NEXT TABLE
10500 SUB T2,[XWD 1,0]
10600 TLNE T2,-1 ;DONE?
10700 JRST RLOP2 ;NO
10800 RRDON1: SUBI D,1 ;GO TO NEXT GATE
10900 CAME D,DSAV1 ;DONE?
11000 JRST RLOP1 ;NO
11100
11200 ;AT THIS POINT WE FIND ALL LOOPS.
11300 ;TO DO THIS, WE FIRST MAKE A SET OF ALL GATES WHICH ARE INVOLVED
11400 ;IN LOOPS (PLUS A FEW EXTRANEOUS ONES)
11500 ;FIRST WE MAKE A SET OF ALL GATES:
11600
11700 MLOOP1: MOVEI A, ;INIT POINTER
11800 MOVEI B,777
11900 SLOP4: SKIPN HTYPS(B) ;IS THIS A GATE?
12000 JRST SLD1 ;NO, QUIT
12100 PUSHJ P,LEPUT ;YES, PUT IT IN
12200 SOJA B,SLOP4 ;AND LOOP
12300 ; NOW ELIMINATE GATES WHICH ARE NOT DRIVEN BY OTHER GATES, AND ITERATE:
12400 SLD1:
12500 MOVE E,A ;GET LIST SO FAR
12600 PUSH P,E
12700 MOVEI A, ;INIT NEW LIST POINTER
12800 SLOP5: MOVE F,1(E) ;GET NEXT GATE FROM OLD LIST
12900 MOVE F,MTYPS(F) ;GET POINTER TO ITS OUTPUTS
13000 TRNN F,-1
13100 JRST SLD5
13200 SLOP6: MOVE G,1(F) ;GET POINTER TO INPUTS FOR NEXT OUTPUT
13300 SLOP7: TRNN G,-1 ;ANY LEFT?
13400 JRST SLD3 ;NO
13500 HRRZ B,1(G) ;GET GATE #
13600 JUMPE B,SLD4 ;IGNORE IF CARD EDGE PIN
13700 PUSHJ P,LEPUT ;PUT INTO NEW LIST
13800 SLD4: HRRZ G,(G) ;GET NEXT INPUT (GATE)
13900 JRST SLOP7
14000 SLD3: HRRZ F,(F) ;GET NEXT OUTPUT PIN
14100 JUMPN F,SLOP6 ;LOOP IF THERE ARE ANY MORE
14200 SLD5: HRRZ E,(E) ;GET NEXT GATE IN OLD LIST
14300 JUMPN E,SLOP5 ;LOOP IF THERE ARE ANY MORE
14400 ; NOW SEE IF LISTS ARE THE SAME:
14500 MOVE B,(P)
14600 PUSHJ P,LCOM ;ARE NEW AND OLD LISTS THE SAME?
14700 JRST [EXCH A,(P)
14800 PUSHJ P,LRET
14900 POP P,A
15000 JRST SLD1]
15100 SCON5: ;NOW REMOVE THOSE THAT DON'T DRIVE ANYTHING (AND ITERATE)
15200 MOVE E,B ;GET STARTING LIST
15300 PUSHJ P,LRET ;RETURN OTHER LIST
15400 MOVEI A, ;INIT NEW LIST
15500 PUSH P,E ;SAVE LIST POINTER
15600 SLOP15: MOVE F,1(E) ;GET NEXT GATE #
15700 MOVE F,MTYPS(F) ;GET OUTPUT PIN LIST
15800 TRNN F,-1 ;ANY LEFT?
15900 JRST SLD15 ;NO
16000 SLOP16: MOVE G,1(F) ;GET POINTER TO INPUTS FOR NEXT OUTPUT
16100 SLOP17: TRNN G,-1 ;ANY LEFT?
16200 JRST SLD13 ;NO
16300 HRRZ B,1(G) ;GET GATE #
16400 JUMPE B,SLD14 ;IGNORE IF CARD EDGE PIN
16500 PUSH P,A ;SAVE A
16600 MOVE A,-1(P) ;GET LIST OF CURRENT BODIES
16700 PUSHJ P,LECONT ;IS DRIVEN BODY AN INTERESTING ONE?
16800 JRST SLD144 ;NO, SKIP IT
16900 POP P,A ;YES, RESTORE A
17000 MOVE B,1(E) ;GET ORRIGINAL GATE
17100 PUSHJ P,LEPUT ;PUT INTO NEW LIST
17200 JRST SLD15 ;TRY NEXT GATE
17300 SLD144: POP P,A
17400 SLD14: HRRZ G,(G) ;GET NEXT INPUT (GATE)
17500 JRST SLOP17
17600 SLD13: HRRZ F,(F) ;GET NEXT OUTPUT PIN
17700 JUMPN F,SLOP16 ;LOOP IF THERE ARE ANY MORE
17800 SLD15: HRRZ E,(E) ;GET NEXT GATE IN OLD LIST
17900 JUMPN E,SLOP15 ;LOOP IF THERE ARE ANY MORE
18000 ; NOW SEE IF LISTS ARE THE SAME:
18100 MOVE B,A ;PUT NEW LIST IN B
18200 POP P,A ;OLD LIST IN A
18300 PUSHJ P,LCOM ;ARE NEW AND OLD LISTS THE SAME?
18400 JRST SCON5
18500 MOVE E,B ;THEY ARE EQUAL, HOLD ONE COPY
18600 PUSHJ P,LRET ;RETURN THE OTHER
18700 JUMPE E,NOLOOP ;NO LOOPS IF E IS 0
18800 ; NOW FORM A LIST OF ALL LOOPS:
18900
19000 MOVEI F, ;INIT LIST OF LOOPS
19100 MOVE B,1(E) ;GET AN ARBITRARY GATE TO START WITH
19200 SLOP21: PUSHJ P,MAKLP ;MAKE A LIST OF LOOPS
19300 PUSH P,E ;SAVE GATE LIST
19400 SLOP22: MOVE B,1(E) ;GET NEXT GATE
19500 PUSHJ P,ISINLP ;IS IT IN A LOOP?
19600 JRST [POP P,E ;NO, MAKE MORE LOOPS WITH THIS GATE
19700 JRST SLOP21]
19800 HRRZ E,(E)
19900 JUMPN E,SLOP22 ;YES, TRY NEXT GATE
20000 POP P,E
20100 ;WE NOW HAVE ALL GATES IN SOME LOOP
20200 PUSHJ P,CONSOL ;CONSOLIDATE THE LOOP LIST
20300 MOVEI D,
20400 MOVE G,F ;MAKE A LIST OF ALL LENGTH-2 LISTS
20500 SLOP23: HLRZ H,1(G) ;GET LENGTH
20600 CAIN H,2 ;IS IT 2?
20700 JRST [ GETFST (A,B);YES
20800 MOVEM D,(A)
20900 MOVE D,A
21000 MOVE A,1(G)
21100 MOVEM A,1(D)
21200 JRST .+1]
21300 HRRZ G,(G) ;NO,GET NEXT
21400 JUMPN G,SLOP23 ;LOOP IF MORE
21500 JUMPE D,NO2 ;NO LENGTH-2 LOOPS?
21600 SETZM DIDSW
21700 PUSH P,F
21800 PUSH P,E
21900 FRLP1: HRRZ G,1(D) ;GET A LOOP
22000 HRRZ H,(G) ;GET POINTER TO SECOND ELEMENT
22100 MOVE T,1(G) ;GET GATE #
22200 MOVE T1,1(H) ;GET OTHER GATE #
22300 FOR IQ IN (T,T1)
22400 { HRRZ Q,HTYPS(IQ);GET TYPE
22500 MOVE T2,TYPTB3(Q);GET FLAGS ETC.
22600 TLNN T2,FFOK+FFAOI;OK FOR LOOP?
22700 JRST NOKL ;NO
22800 LSH C,2
22900 TSO C,T2 ;FORM TYPE OF FF INDEX
23000 }
23100 ANDI C,17 ;GET TYPE OF FF INDEX
23200 PUSH P,D
23300 SKIPGE D,FFITB1(C);GET FLAGS FOR TYPE OF FF
23400 EXCH T,T1 ;SWITCH TOP & BOTTOM GATES IF APPR.
23500 SETOM DIDSW
23600 EXCH T,T1 ;TEMPORARILY SWITCH TOP & BOT.
23700 PUSHJ P,REMOUT ;FIND WHICH INPUT PIN ON ONE IS DRIVEN BY LOOP
23800 ;AND REMOVE IT
23900 EXCH T,T1 ;DO THE SAME FOR OTHER
24000 PUSHJ P,REMOUT
24100 TLNE D,2 ;IS TOP GATE AOI?
24200 JRST TAOI ;YES
24300 HRRZ Q,HTYPS(T) ;GET TYPE OF TOP GATE
24400 HRRZ Q,TYPTB3(Q);GET REPLACEMENT TABLE
24500 ADDI Q,(D) ;ADD FF TYPE
24600 MOVE F,(Q) ;GET POINTER TO REPL. TABLE
24700 AOC1: MOVE E,FFTB2(D) ;GET TYPE NAME
24800 PUSH P,D
24900 HRRZ D,T ;GET GATE #
25000 PUSH P,T1
25100 PUSHJ P,REPLAC ;DO THE REPLACEMENT
25200 POP P,T1
25300 POP P,D
25400 TLNE D,1 ;IS BOTTOM GATE AOI?
25500 JRST BAOI ;YES
25600 HRRZ Q,HTYPS(T1);GET TYPE OF BOTTOM GATE
25700 HRRZ Q,TYPTB3(Q);GET REPLACEMENT TABLE
25800 ADDI Q,1(D) ;ADD FF TYPE +1
25900 MOVE F,(Q) ;GET POINTER TO REPLACEMENT TABLE
26000 AOC2: MOVE E,FFTB2(D) ;GET TYPE NAME
26100 HRRZ D,T1 ;GET GATE #
26200 PUSHJ P,REPLAC+1;DO THE REPLACEMENT
26300 POP P,D
26400 NOKL: HRRZ D,(D)
26500 JUMPN D,FRLP1
26600 POP P,E
26700 POP P,F
26800 SKIPN DIDSW ;DID WE REPLACE ANYTHING?
26900 JRST FFRDON ;NO
27000 PUSHJ P,LLRET ;RETURN THINGS TO FS
27100 JRST MLOOP1
27200 LLRET: MOVE C,F ;GET LOOP LIST
27300 HRRZ A,1(F) ;GET NEXT LIST
27400 PUSHJ P,LRET ;RETURN TO FREE STRG.
27500 HRRZ F,(F) ;GET NEXT
27600 JUMPN F,.-3 ;LOOP
27700 MOVE A,C ;GET LIST LIST
27800 PUSHJ P,LRET ;RETURN TO FS
27900 MOVE A,E ;GET GATE LIST
28000 PUSHJ P,LRET ;RETURN TO FS
28100 POPJ P,
28200 TAOI: HLRZ Q,T ;GET LOOP PIN #
28300 MOVE F,TATB(Q) ;GET POINTER TO REPL. TABLE
28400 JRST AOC1
28500 BAOI: HLRZ Q,T1 ;GET LOOP PIN #
28600 MOVE F,BATB(Q) ;GET POINTER TO REPL. TABLE
28700 JRST AOC2
28800 FFRDON:
28900 NO2: MOVE A,E ;GET GATE LIST
29000 PUSHJ P,LRET ;REUTN TO FREE STORAGE
29100 MOVE E,F ;GET LOOP LIST
29200 NLLP1: HRRZ A,1(E) ;GET A LOOP
29300 PUSHJ P,FCHK ;CHECK FOR LEGAL
29400 HRRZ E,(E) ;GET NEXT
29500 JUMPN E,NLLP1 ;LOOP
29600 PUSHJ P,LLRET ;RETURN THINGS TO FS
29603 NOLOOP: MOVEI A,
29606 MOVEI B,
29609 HELP1: CAML B,CEPNUM
29612 JRST HEPN1
29615 GETFST (C,D)
29618 MOVEM A,(C)
29621 MOVE A,C
29624 MOVE D,CEPINS(B)
29627 MOVEM D,1(A)
29630 AOJA B,HELP1
29633 HEPN1: MOVEI B,777
29636 HELP3: HRRZ E,MTYPS(B)
29639 JUMPE E,HEPN2
29642 HELP2: GETFST (C,D)
29645 MOVEM A,(C)
29648 MOVE A,C
29651 MOVE D,1(E)
29654 MOVEM D,1(A)
29657 HRRZ E,(E)
29660 JUMPN E,HELP2
29663 HEPN2: SUBI B,1
29666 SKIPE HTYPS(B)
29669 JRST HELP3
29672 HELP4: HRRZ B,1(A)
29675 HRRZ C,(A)
29678 FSTRET (A)
29681 MOVE A,C
29684 PUSHJ P,HEDO
29687 JUMPN A,HELP4
29700 MOVE Q,CEPNUM ;
29800 MOVEI D,777
29900 NLLP6: HRRZ E,MTYPS(D) ;GET OUTPUT PIN LIST
30000 JUMPE E,NLLP5 ;NONE?
30100 NLLP4: HRRZ F,1(E) ;GET INPUT LIST FOR THIS OUTPUT
30200 HRRZS (E)
30300 NLLP3: HRRZ G,1(F) ;GET GATE #
30400 JUMPN G,NLLP2 ;CARD EDGE PIN?
30500 HLLZ H,1(F) ;YES, GET PIN #
30600 MOVEM H,CEPINS(Q);MAKE ENTRY
30700 ADDI Q,1
30800 HLLM H,(E) ;DEPOSIT PIN #
30900 NLLP2: HRRZ F,(F) ;GET NEXT INPUT
31000 JUMPN F,NLLP3 ;LOOP
31100 HRRZ E,(E) ;GET LIST FOR NEXT OUTPUT PIN
31200 JUMPN E,NLLP4
31300 NLLP5: SUBI D,1
31400 SKIPE HTYPS(D) ;GET NEXT GATE
31500 JRST NLLP6
31600 MOVEM Q,CEPNUM ;SAVE NEW PIN COUNT
31700 MOVEI A,2 ;STARTING MJW NODE #
31800 MOVEI B,
31820 SKIPL C,CEPINS(B)
31840 JRST .+3
31860 HLRZM C,CEPPIN(B)
31880 JRST .+3
31900 HRRZM A,CEPPIN(B);ASSIGN MJW NODE #'S TO INPUT CE PINS
32000 ADDI A,1
32100 ADDI B,1
32200 HRRZ C,CEPINS(B);GET NODE POINTER FOR THIS PIN
32300 JUMPN C,.-10 ;IF NOT 0, STILL AN INPUT PIN
32400 MOVEM A,DIDONM# ;SAVE THIS MJW # -- SEPERATES INPUT FROM OUTPUT
32500 ADDI A,1
32600 HRROM A,CEPPIN(B);ASSIGN MJW # FOR OUTPUT PIN
32700 CAMGE B,CEPNUM ;DONE?
32800 AOJA B,.-3 ;NO, LOOP
32900 SETZM CEPPIN(B) ;CLEAR THE EXTRA ONE
33000 MOVEM A,DONOD# ;DEPOSIT THIS MJW # -- END OF CE PINS
33100 ADDI A,1
33200 MOVEI D,777
33300 NLLP14: HRRZ E,MTYPS(D) ;GET OUTPUT PIN LIST
33400 JUMPE E,NLLP15 ;NONE?
33500 NLLP13: HLLZ F,(E) ;GET CE PIN # IF ANY
33600 JUMPE F,NLLP11 ;CE PIN?
33700 MOVEI B, ;YES, CE PIN
33800 CAME F,CEPINS(B);GIND IT IN TABLE
33900 AOJA B,.-1
34000 HRRZ C,CEPPIN(B);GET MJW #
34100 HRLM C,(E) ;DEPOSIT IT
34200 JRST NLLP12
34300 NLLP11: HRLM A,(E) ;DEPOSIT NEXT MJW #
34400 ADDI A,1
34500 NLLP12: HRRZ E,(E) ;GET NEXT OUTPUT PIN
34600 JUMPN E,NLLP13 ;LOOP IF ANY LEFT
34700 NLLP15: SUBI D,1
34800 SKIPE HTYPS(D) ;DONE?
34900 JRST NLLP14 ;NO, LOOP ON NEXT GATE
35000 MOVEM A,LNODNM# ;DEPOSIT LAST NODE MJW #
35100 ADDI A,1
35200 MOVEI D,777
35300 NLLP17: SKIPN MTYPS(D) ;THIS GATE USED?
35400 JRST .+3 ;NO
35500 HRLM A,MTYPS(D) ;YES, ASSIGN AN MJW #
35600 ADDI A,1
35700 SUBI D,1 ;GO TO NEXT GATE
35800 SKIPE HTYPS(D) ;DONE?
35900 JRST NLLP17 ;NO, LOOP
36000 MOVEM A,SAVNWD# ;SAVE HIGHEST MJW # USED
36100 MOVE Q,SAVNWD ;PUT OUT NWRD
36200 PUSHJ P,WOUT
36300 MOVE Q,DIDONM ;PUT OUT THE OTHER...
36400 PUSHJ P,WOUT ;RELEVANT SIZE NUMBERS
36500 MOVE Q,DONOD ;...
36600 PUSHJ P,WOUT
36700 MOVE Q,LNODNM ;...
36800 PUSHJ P,WOUT
36900 MOVEI C,1 ;INIT RELATIVE LINK ADDRS
37000 MOVEI B,
37100 WLP4: HRRZ A,CEPPIN(B);GET MJW #
37140 TRNE A,400000 ;NEG. PIN #?
37180 AOJA B,WLP4 ;YES, SKIP IT
37200 HRRZ D,CEPINS(B);GET INPUT LIST
37300 JUMPE D,WLP1 ;OUTPUT PIN?
37400 WLPF1: PUSHJ P,GMJW1 ;NO, GET MJW # OF GATE
37500 AOJA B,WLP4 ;NONE BUT CE PINS
37520 TLNN E,-1 ;0 MJW #?
37540 JRST [HRRZ D,(D);YES
37560 JUMPN D,WLPF1
37580 AOJA B,WLP4]
37600 PUSHJ P,MIGAT ;MAKE IGRF ENTRY FOR GATE
37700 MOVE Q,E ;SAVE IT
37800 WLP3: HRRZ D,(D) ;GET NEXT
37900 JUMPE D,WLP2 ;NO MORE?
38000 PUSHJ P,GMJW1 ;GET MJW #
38100 JRST WLP2 ;NO MORE EXCEPT CE PINS
38140 TLNN E,-1 ;0 WIRE #?
38160 JRST WLP3 ;YES, IGNORE
38200 PUSHJ P,MIGAT ;MAKE IGRF ENTRY FOR GATE
38300 PUSHJ P,WOUT ;PUT OUT LAST ONE
38400 MOVE Q,E ;HOLD THIS ONE
38500 HRR Q,C ;PUT IN LINK
38600 AOJA C,WLP3 ;LOOP
38700 WLP2: MOVEM Q,OGRF(A) ;DEPOSIT OUTGRF ENTRY
38800 AOJA B,WLP4 ;LOOP
38900 WLP1:
39000 MOVEI B,777
39100 WLP9: HRRZ H,MTYPS(B) ;GET OUTPUT LIST
39200 JUMPE H,WLP15 ;NO OUTPUTS?
39300 WLP8: HLRZ A,(H) ;GET MJW # FOR NODE
39400 HRRZ D,1(H) ;GET INPUT LIST
39500 WLPF2: PUSHJ P,GMJW1 ;NO, GET MJW # OF GATE
39600 JRST WLP5 ;NONE BUT CE PINS
39620 TLNN E,-1 ;0 #?
39640 JRST [HRRZ D,(D);YES
39660 JUMPN D,WLPF2
39680 JRST WLP5]
39700 PUSHJ P,MIGAT ;MAKE IGRF ENTRY FOR GATE
39800 MOVE Q,E ;SAVE IT
39900 WLP7: HRRZ D,(D) ;GET NEXT
40000 JUMPE D,WLP6 ;NO MORE?
40100 PUSHJ P,GMJW1 ;GET MJW #
40200 JRST WLP6 ;NO MORE EXCEPT CE PINS
40240 TLNN E,-1 ;0 WIRE #?
40260 JRST WLP7 ;YES, IGNORE
40300 PUSHJ P,MIGAT ;MAKE IGRF ENTRY FOR GATE
40400 PUSHJ P,WOUT ;PUT OUT LAST ONE
40500 MOVE Q,E ;HOLD THIS ONE
40600 HRR Q,C ;PUT IN LINK
40700 AOJA C,WLP7 ;LOOP
40800 WLP6: MOVEM Q,OGRF(A) ;DEPOSIT OUTGRF ENTRY
40900 WLP5: HRRZ H,(H) ;GET NEXT OUTPUT
41000 JUMPN H,WLP8 ;LOOP
41100 WLP15: SUBI B,1
41200 SKIPE HTYPS(B)
41300 JRST WLP9
41400 MOVEI B,777
41500 WLP13: HRRZ H,MTYPS(B) ;GET OUTPUT LIST
41600 HLRZ A,MTYPS(B) ;GET MJW # FOR GATE
41700 JUMPE H,WLP11 ;NONE?
41800 HLRZ E,(H) ;GET MJW # FOR OUTPUT
41900 HRLZM A,IGRF(E) ;GATE A DRIVES NODE E
42000 MOVS Q,E ;SAVE IT
42100 WLP12: HRRZ H,(H) ;GET NEXT
42200 JUMPE H,WLP10 ;NO MORE?
42300 HLRZ E,(H) ;GET MJW # OF OUTPUT
42400 HRLZM A,IGRF(E) ;GATE A DRIVES NODE E
42500 PUSHJ P,WOUT ;PUT OUT LAST ONE
42600 MOVS Q,E ;HOLD THIS ONE
42700 HRR Q,C ;PUT IN LINK
42800 AOJA C,WLP12 ;LOOP
42900 WLP10: MOVEM Q,OGRF(A) ;DEPOSIT OUTGRF ENTRY
43000 WLP11:
43100 SUBI B,1
43200 SKIPE HTYPS(B)
43300 JRST WLP13
43400 MOVNI Q,1
43500 PUSHJ P,WOUT
43600 FOR @$ QRN IN (I,O)
43700 { MOVEI A,2
43800 MOVE Q,QRN$GRF(A)
43900 PUSHJ P,WOUT
44000 CAMGE A,SAVNWD
44100 AOJA A,.-3
44200 MOVNI Q,1
44300 PUSHJ P,WOUT
44400 }
44500
44600 MOVEI F,
44700 MOVEI B,
44800 FP1: HRRZ C,CEPINS(B)
44900 JUMPE C,FP4
45000 GETFST (A,D)
45100 HRRZM F,(A)
45200 HRRZM C,1(A)
45300 HRRZ G,CEPPIN(B)
45400 HRLM G,1(A)
45500 MOVE F,A
45600 SKIPE CEPINS+1(B)
45700 AOJA B,FP1
45800 FP4: MOVEI B,777
45900 FP2: HRRZ H,MTYPS(B)
46000 FP3: HRRZ C,1(H)
46100 GETFST (A,D)
46200 HRRZM F,(A)
46300 HRRZM C,1(A)
46400 HLRZ G,(H)
46500 HRLM G,1(A)
46600 MOVE F,A
46700 HRRZ H,(H)
46800 JUMPN H,FP3
46900 SKIPE HTYPS-1(B)
47000 SOJA B,FP2
47100 WBUF←IGRF+=100
47200 MOVE T,SAVNWD
47300 SUBI T,1
47400 IDIVI T,=18
47500 ADDI T,1
47600 MOVEI B,777
47700 MOVEI H,WBUF
47800 MOVEM H,WB
47900 MOVEI C,1
48000 FWL1: CLR (IGRF,=40)
48100 AOS IGRF
48200 HRROS IGRF
48300 HRRZ H,MTYPS(B) ;GET OUTPUT POINTER
48400 JUMPE H,FWL12 ;NO OUTPUTS?
48500 FWL2: HLRZ D,(H) ;GET OUTPUT MJW #
48600 HLRZ E,1(H) ;GET GATE PIN #
48700 HRROM D,IGRF(E) ;DEPOSIT MJW # FOR THIS PIN #(OUTPUT PIN)
48800 HRRZ H,(H) ;GET NEXT OUTPUT PIN
48900 JUMPN H,FWL2
49000 MOVE A,F ;GET NODE LIST
49100 FWL5: HLRE J,1(A) ;GET MJW # FOR NODE
49200 HRRZ H,1(A) ;GET INPUT LIST
49300 FWL4: HRRZ G,1(H) ;GET GATE #
49400 CAME G,B ;SAME GATE #?
49500 JRST FWL3 ;NO
49600 HLRZ E,1(H) ;GET GATE PIN #
49700 HRRZM J,IGRF(E) ;DEPOSIT MJW # FOR THIS PIN #(INPUT PIN)
49800 FWL3: HRRZ H,(H) ;GET NEXT INPUT
49900 JUMPN H,FWL4
50000 HRRZ A,(A) ;GET NEXT NODE
50100 JUMPN A,FWL5
50200 HRRZ A,HTYPS(B) ;GET TYPE OF GATE
50300 MOVE E,TYPTB2(A) ;GET I/O PIN BITS
50400 MOVEI T1,IGRF
50500 TRNE E,1 ;IS THIS AN OUTPUT PIN?
50600 HRROS (T1) ;YES, MARK IT
50700 ADDI T1,1 ;GO TO NEXT
50800 LSH E,-1 ;GO TO NEXT
50900 JUMPN E,.-4 ;LOOP IF ANY OUTPUT PINS LEFT
51000 HLRZ E,TYPTB4(A);GET CONVERSION POINTER
51100 JUMPE E,FWL6 ;NO CONVERSION?
51200 MOVE T1,[XWD IGRF,OGRF]
51300 BLT T1,OGRF+=37 ;MOVE TO OGRF TO CONVERT
51400 CLR (IGRF+1,=37)
51500 HRLI E,440600 ;MAKE BYTE POINTER
51600 FWL7: ILDB T1,E ;GET CONVERSION..
51700 ILDB T2,E ;NUMBERS
51800 JUMPE T1,FWL6 ;DONE?
51900 SKIPE Q,OGRF(T1) ;DO CONVERSION
52000 ORM Q,IGRF(T2) ;...
52100 JRST FWL7 ;LOOP
52200 FWL6: HRRZ A,HTYPS(B)
52300 SETZM SKPFLG
52400 HRRZ E,TYPTB4(A) ;GET TABLE POINTER
52600 HLRZ T2,(E) ;GET # OF LINES
52610 JUMPN T2,.+4
52620 ADD E,QTYPS(B)
52630 HRRZ E,(E)
52640 HLRZ T2,(E)
52650 HRRZ T1,(E) ;GET # OF COLS.
52700 ADD E,[XWD 440200,1];MAKE POINTER
52800 FWL8: MOVE A,WB
52900 SETOM (A)
53000 HRLS A
53100 ADDI A,1
53200 ADD T,WB
53300 BLT A,(T)
53400 SUB T,WB
53500 SETZM DIDSW
53600 PUSH P,T1 ;SAVE # OF COLS.
53700 MOVEI H, ;INDEX TO CONV. TABLE
53800 FWL9: ILDB D,E ;GET TABLE ENTRY
53900 SKIPN G,IGRF(H) ;GET CONV. ENTRY
54000 XCT ITAB3(D) ;IF ZERO, DO IT DIFFERENTLY
54020 TRNE G,400000 ;NEG MJW #?
54040 XCT ITAB5+2(G) ;YES
54100 HRRZ J,G ;GET COL #
54200 JUMPE J,FWL10
54300 PUSHJ P,GBP ;MAKE BYTE POINTER
54400 LDB J1,J ;GET CURRENT ENTRY
54500 LSH J1,2
54600 OR J1,D ;MAKE INDEX
54700 XCT ITAB1(J1) ;DO THE THING
54800 DPB D,J ;DEPOSIT NEW ENTRY
54900 SKIPE SKPFLG ;SKIP THIS ONE?
55000 JRST NOU ;YES
55100 JUMPGE G,FWL10 ;OUTPUT ENTRY?
55200 LDB J1,J ;YES, GET ENTRY
55300 XCT ITAB2(J1) ;SET SWITCH IF APPROP.
55400 FWL10: ADDI H,1 ;GO TO NEXT ENTRY
55500 SOJG T1,FWL9 ;LOOP
55600 HLRZ J,MTYPS(B) ;GET GATE MJW #
55700 PUSHJ P,GBP ;GET BYTE POINTER TO COL.
55800 MOVE T1,
55900 DPB T1,J ;MARK GATE # COL.
56000 MOVE T1,WB
56100 HRLI T1,420200
56200 LDB J,T1
56300 XCT (J)[SKIPN DIDSW
56400 SKIPN DIDSW ;DID LINE HAVE A MEANINGFUL OUTPUT?
56500 SKIPA
56600 SKIPN DIDSW]
56700 JRST NOU2 ;NO
56800 MOVE J,(J)[0↔0↔3↔3]
56900 DPB J,T1
57000 PUSHJ P,MOUT ;YES, PUT IT OUT
57100 FWL11: POP P,T1 ;GET COL COUNT
57200 HRLI E,440200 ;GO TO NEXT LINE
57300 ADDI E,1 ;...
57400 SOJG T2,FWL8 ;LOOP
57500 FWL12: SKIPE HTYPS-1(B);DONE?
57600 SOJA B,FWL1 ;NO, LOOP
57700 MOVSI Q,400000
57800 PUSHJ P,WOUT
57900 RELEAS 1,
58000 RELEAS 2,
58100 PUSHJ P,PRT
58200 CALLI 12
58300 END STRT