perm filename SS[2,PMP] blob
sn#008031 filedate 1970-10-25 generic text, type T, neo UTF8
00100 TITLE SS
00200 A←1
00300 PNT←4
00400 CNT←5
00500 B←11
00600 B1←12
00700 B2←13
00800 T←14
00900 T1←15
01000 T2←16
01100 C←17
01200
01300 BUFLEN←←10*10*=36
01400
01500
01600 STRT: CALLI
01700 SETZM BUF
01800 MOVE T,[XWD BUF,BUF+1]
01900 BLT T,BUF+BUFLEN-1
02000 OUTSTR [ASCIZ /SET UP INITIAL STUFF
02100 /]
02200 SETZB T,T2
02300 SETZM NUM
02400 MOVEI T,BUFLEN/2
02500 LOP1: FOR I←0,7,2
02600 < SETZB A+I,A+I+1
02700 >
02800 MOVEI B,A+4
02900 MOVSI T1,400000
03000 INCHWL C
03100 CAIN C,15
03200 JRST INDOON
03300 LOP2: CAIN C,15
03400 JRST LINDON
03500 CAIN C,40
03600 JRST SPC
03700 ORM T1,(B)
03800 SPC: TRNE T1,1
03900 ADDI B,1
04000 ROT T1,-1
04100 INCHWL C
04200 JRST LOP2
04300 LINDON: INCHWL C
04400 FOR I←0,7
04500 < MOVEM A+I,BUF+I(T)
04600 >
04700 ADDI T,10
04800 JRST LOP1
04900 INDOON: INCHRW C
05000 INDON: JSR DISP
05100 INCHRW C
05200 CAIN C,"R"
05300 JRST ITR
05400 CAIN C,"S"
05500 JRST ITS
05600 CAIN C,"G"
05700 JRST ITG
05800 JSR NEW
05900 AOS NUM
06000 JRST INDON
06100
06200 ITS: JRST STRT
06300 ITR: MOVEM 1,SAVE1
06500 MOVEM 2,SAVE2
06600 MOVEM 3,SAVE3
06700 MOVE 2,NUM
06800 MOVEI 1,STACK
06850 OUTSTR [ASCIZ /
06875 /]
06900 PUSHJ 1,DECOUT
06950 OUTSTR [ASCIZ /
06975 /]
07000 MOVE 1,SAVE1
07100 MOVE 2,SAVE2
07200 MOVE 3,SAVE3
07300 JRST INDON
07400
07500 STACK: BLOCK =12
07600 SAVE1: 0
07700 SAVE2: 0
07800 SAVE3: 0
07900
08000 ITG: INCHRS C
08100 AOSA NUM
08200 JRST INDON
08300 JSR DISP
08400 JSR NEW
08500 JRST ITG
08600
08700 NUM: 0
08800
08805 DECOUT: IDIVI 2,=10
08810 HRLM 3,(1)
08815 JUMPE 2,.+2
08820 PUSHJ 1,DECOUT
08825 HLRZ 2,(1)
08830 MOVEI 2,"0"(2)
08835 OUTCHR 2
08840 POPJ 1,
08845
08900 NEW: 0
09000 SETZM BUF1
09100 MOVE A,[XWD BUF1,BUF1+1]
09200 BLT A,BUF1+BUFLEN-1
09300 MOVEI T1,-1
09400 SETZB T,T2
09500 MOVSI B,400000
09600 MOVSI B2,200000
09700 MOVEI B1,1
09800 MOVEI A,BUFLEN
09900 NLOP11: FOR I IN (-10,,+10)
10000 < FOR J←1,3
10100 < SKIPE BUF I-2+J(T)
10200 JRST NLOP1
10300 >>
10400 ADDI T1,1
10500 AOS T,T2
10600 SOJG A,NLOP11
10700 JRST NLOP12
10800 NLOP1: MOVEI C,
10900 DEFINE MAC W(X,Y)
11000 < TDNE BWY,BUFWX(TWY)
11100 ADDI C,1>
11200 FOR I IN (<-10,1>,<-10,>,<-10,2>,<,1>,<,2>,<+10,1>,<+10,>,<+10,2>)
11300 < MAC (I)
11400 >
11500 MOVE A+1,BUF(T)
11600 AND A+1,B
11700 XCT TABL(C)
11800 FOR @W I IN (,1,2)
11900 < TRNE BWI,1
12000 ADDI TWI,1
12100 ROT BWI,-1
12200 >
12300 JUMPGE B,NLOP1
12400 SOJG A,NLOP11
12500 NLOP12: MOVE T,[XWD BUF1,BUF]
12600 BLT T,BUF+BUFLEN-1
12700 JRST @NEW
12800 TABL: JFCL
12900 JFCL
13000 ORM A+1,BUF1(T)
13100 ORM B,BUF1(T)
13200 REPEAT 5,<JFCL>
13300
13400 BLOCK 13
13500 BUF: BLOCK BUFLEN
13600 BLOCK 12
13700 BUF1: BLOCK BUFLEN
13800
13900
14000 0
14100 DB: BLOCK 2000
14200 DISP: 0
14300 MOVE T,[XWD DB,DB+1]
14400 SETZM DB
14500 AOS DB
14600 BLT T,DB+1777
14700 MOVE PNT,[POINT 7,DB-1]
14800 MOVEI T1,-220
14900 MOVEI T2,-220
15000 MOVEI T,
15100 MOVEI
15200 MOVEI B1,BUFLEN/10
15300 MOVEI C,546
15400 MOVSI B,400000
15500 DLOP1: MOVEI B2,10
15600 DLOP3: SKIPE BUF(T)
15700 JRST DLOP2
15800 ADDI CNT,=36
15900 ADDI T1,=36
16000 ADDI T,1
16100 SOJG B2,DLOP3
16200 JRST DLOP33
16300 DLOP2: TDNE B,BUF(T)
16400 JRST ITON
16500 ADDI CNT,1
16600 DRET1: ADDI T1,1
16700 ROT B,-1
16800 JUMPGE B,DLOP2
16900 ADDI T,1
17000 SOJG B2,DLOP3
17100 DLOP33: MOVEI
17200 ADDI T2,1
17300 MOVEI T1,-220
17400 SOJG B1,DLOP1
17500 SETZM 1(PNT)
17600 SUBI PNT,DB-2
17700 HRRZM PNT,ADR+1
17800 UPGIOT ADR
17900 JRST @DISP
18000 ITON: TROE 1
18100 JRST INON
18200 TOOBIG: MOVEI CNT,
18300 HRLI PNT,440700
18400 DPB T1,[POINT 8,C,7]
18500 DPB T2,[POINT 8,C,18]
18600 MOVEM C,1(PNT)
18700 ADDI PNT,2
18800 INON: JUMPE CNT,ITZER
18900 CAIL CNT,7
19000 JRST TOOBIG
19100 MOVEI A,40
19200 IDPB A,PNT
19300 SOJG CNT,.-1
19400 ITZER: MOVEI A,"o"
19500 IDPB A,PNT
19600 JRST DRET1
19700
19800 ADR: DB-1
19900 0
20000 END STRT