0 CLR:PRINTCHR$(14)"""":POKE59468,12:PRINTCHR$(142)
1 PRINT""SPC(15)"":PRINTSPC(12)""
2 PRINTSPC(4)"":FORI=1TO1000:NEXT
3 REM PART# 321009
5 DIM C%(51)
6 W1$="":W2$="":W3$="":W4$="":W7$=W2$+""
7 B$="":FORZ1=1TO30:B$=B$+"":NEXT
8 W8$="":W9$="":YY$="":FF=1
22 PRINT"":YZ$="":GOSUB30:GOTO235
30 W$="":GOSUB50110:GOSUB51540
35 FORI=0TO51:C%(I)=I:NEXT
40 FORI=0TO51
41 R=51*RND(1)+1
42 TE=C%(I):C%(I)=C%(R):C%(R)=TE:NEXT:R=0:E=1
45 RETURN
100 PRINT""Y$""Y$""Y$"";:RETURN
101 PRINT""Y$""Y$""Y$""Y$"";:RETURN
102 PRINT""Y$""Y$""Y$""Y$""Y$"";:RETURN
103 GOSUB116:GOTO119
104 GOSUB103:GOTO121
105 GOSUB117:GOTO119
106 GOSUB105:PRINT""Y$;:RETURN
107 GOSUB118:GOTO119
108 GOSUB107:GOTO121
109 GOSUB118:PRINT""W1$W3$""Y$""Y$"";:RETURN
110 PRINT""W3$""W3$""W3$"";
111 PRINTW3$""W3$""W3$""W3$"";:GOTO119
112 PRINT""W3$""W3$""W3$"";
113 PRINT W3$""W3$""W3$"";:GOTO119
114 PRINT""W3$""W3$""W3$"";
115 PRINTW3$"" W3$""W3$""W3$"";:GOTO119
116 PRINT"" Y$""Y$""Y$""Y$ "";:RETURN
117 GOSUB116:PRINT""Y$""Y$"";:RETURN
118 GOSUB116:PRINT""Y$""Y$""Y$""Y$"";:RETURN
119 IFX$=""THENPRINTW1$""W3$N$""Y$W2$W4$""N$""Y$"";:RETURN
120 IFX$=""THENPRINTW1$""W3$N$""Y$W2$W4$""N$""Y$"";:RETURN
121 PRINT""Y$"";:RETURN
130 IFZ<>3THENRETURN
131 W$="":IFT=TYTHENW$=""
132 IFT25000THENW$="":GOSUB50100:GOTO30000
30102 H=1:L7=X2:DD=X2:PRINT"":GOSUB49121:PRINT""SPC(20)""X2
30110 IFR>36THENGOSUB30
30900 X$="":GOSUB52000
31004 D2=X3:D2$=N$:D5$=Y$:X=12:Y=0
31300 GOSUB53000:GOSUB50700
31910 X$="":GOSUB52200
40100 H=0:X=0:Y=0:GOSUB53000
40200 D1=X3:D1$=N$:D3$=Y$:H=1:Y=Y−1
40210 X$="":GOSUB52800
40217 IFZ=3THENP2=X8
40218 D4=X3:D4$=N$:D6$=Y$
40224 T5$=STR$(X8)
40225 Y=Y+3:GOSUB53000:GOSUB50700
40360 IFC>1ORZ>0THENRETURN
40370 Y=Y+6
40380 X$="":GOSUB52800:GOSUB53000:Y=Y−1:GOSUB50700
40560 IFC>2THENRETURN
40566 Y=Y−5
40570 IFX3=1THENGOSUB59700
40700 W$=YY$+STR$(X8):GOSUB59800
40710 IFX7=21ORX8=21ORX8>21THEN49000
40720 IFC=5ANDX8<22THEN49000
40723 IFC=2ANDD4=D2ANDZ=0THEN57000
40726 W$="":IFC<3THENW$=LEFT$(W$,22)+""
40730 GOSUB51500
40910 IFJ$=""THENGOSUB40210:GOTO40700
40950 IFJ$=""THEN49000
40956 IFJ$=""ANDC<3THEN59600
40960 GOTO40720
45000 CC=C:X$="":X=0:Y=0:GOSUB53000:X3=D1:N$=D1$:Y$=D3$:GOSUB50700:Y=Y+6
45001 IFZ=3ANDVV=0ANDX8<21THENW$=YY$+STR$(X8):GOSUB59800
45002 IFZ<3ANDX8<22THENW$=YY$+STR$(X8):GOSUB59800
45015 IFX7=21THEN45021
45016 IFCC=2ANDX8=21ANDZ<>3THEN45021
45018 IFX7>16THEN45021
45020 Y=Y+4:C=4:GOSUB40380:GOTO45015
45021 IFZ<>3THEN46000
45022 IFP2=21ANDVV=0THENC=CC:GOTO58000
45023 IFVVTHENGOSUB59500
45024 IFP2>21THENGOSUB57500
45025 IFX7<22THEN45031
45027 PRINT""W2$""X7
45028 IFVV=0ANDP2<21THENT=T+DD
45029 IFV=0ANDP1<21THENT=T+X2
45030 GOTO49004
45031 IFV=0ANDP1<21ANDP1>X7THENT=T+X2
45032 IFP1<21ANDX7>P1ANDV=0THENT=T−X2
45033 IFP2<21ANDX7>P2ANDVV=0THENT=T−DD
45034 IFVV=0ANDP2<21ANDP2>X7THENT=T+DD
46000 GOTO49004
49000 IFC=5ANDX8<22ANDZ=3THENVV=9
49001 IFC=5ANDX8<22ANDZ<3THENV=8
49002 IFZ=2THEN49005
49003 GOTO45000
49004 IFZ=3THEN49110
49005 IFX8>21THENGOSUB57500:GOTO49110
49006 IFX7>21ANDV=0THEN59010
49007 IFX8=21THENGOTO58000
49009 IFX7=21THENGOTO58500
49010 IFV=8THENGOSUB59500:GOTO49110
49011 IFZ=2THEN57100
49015 IFX8>X7THEN59010
49020 IFX8=X7THEN59030
49030 IFX80THENW$=""+STR$(T)
49123 IFT<0THENW$=""+STR$(ABS(T))
49125 W$=W$+LEFT$(B$,20−LEN(W$)):IFFF=0THENPRINT""W$
49126 IFFF=1THENFF=0
49127 RETURN
50100 IFBJ=0ANDX8=21ANDX7<>21THENW$=""
50105 W$=W$+""+B$:W$=LEFT$(W$,32)
50110 FORZ1=1TO10:PRINT""W7$""W$""W7$""W$:NEXTZ1:RETURN
50700 ONX3GOSUB100,101,102,103,104,105,106,107,108,109,110,112,114
50740 RETURN
51500 PRINT""W7$W4$""W$"";
51530 GOSUB63000:X1=VAL(W$):J$=W$
51540 PRINT""W7$""B$"":RETURN
52000 REM
52200 TE=C%(R):X3=INT(TE/4)+1:Y$=MID$(YZ$,TE−4*(X3−1)+1,1)
52210 N$=MID$(YZ$,X3+4,1):X9=X3
52220 R=R+1
52620 IFX3>9THENX9=10
52625 IFX3=1THENX9=11
52630 IFX$<>""THEN52650
52635 X8=X8+X9:IFX3=1THENA=A+1
52640 IFA>0THENIFX8>21THENX8=X8−10:A=A−1
52645 RETURN
52650 X7=X7+X9
52651 IFX3=1THENB=B+1
52652 IFX8<22ANDX7=X8THEN52670
52660 IFB>0ANDX7>21THENX7=X7−10:B=B−1
52670 IFX8>21THENC=3
52700 RETURN
52800 C=C+1
52810 IFX$=""THENX=0
52820 IFX$=""THENX=12
52830 GOTO52200
53000 PRINT""
53100 IFX$=""THENX=12
53120 IFX$=""THEN X=0
53130 IFX=0THEN53405
53200 FORZ1=1TOX:PRINT"";:NEXT
53405 IFY=0THEN53701
53500 FORZ1=1TOY:PRINT"";:NEXT
53701 IFX$=""ANDC=2THEN53710
53705 IFY>0ANDC>0THENPRINT""W1$"";
53710 FORZ1=1TO9
53805 IFH=0THENPRINTW9$"";
53810 IFH=1THENPRINTW8$"";
53910 NEXT
53920 IFH=1THENPRINTW1$;
53930 RETURN
57000 W$="":GOSUB51500
57010 IFJ$=""THENGOTO40726
57015 IFJ$<>""THEN57000
57020 IFD2=1THENA=1
57021 F=X8/2:IFD2=1THENF=11:X8=11
57025 PRINT""W2$"":FORZ1=1TO9:PRINTB$:NEXT:C=0
57030 X$="":X=13:Y=0:GOSUB53000:X3=D2:N$=D2$:Y$=D5$:GOSUB50700
57040 X$="":X=13:Y=20:GOSUB53000:X3=D4:N$=D4$:Y$=D6$:GOSUB50700
57070 X8=F:C=1:Y=−1:Z=2:X=13:GOSUB40210:GOTO40700
57100 IFV=0ANDX8<22THENW$=YY$+STR$(X8):GOSUB59800
57110 A=0:P1=X8:X8=F:C=2:IFD2=1THENA=1
57170 X$="":X8=F:C=1:Y=19:Z=3:X=13:GOSUB40210:GOTO40700
57500 IFZ=3THENT=T−DD
57505 IFZ<3THENT=T−X2
57510 W$=""+T5$:GOSUB59800:F9=20:W$="":RETURN
58000 IFC>2THEN58100
58003 IFZ=0ANDX7=X8THEN59030
58005 IFZ=3THENT=T+(1.5*DD)
58015 IFZ<3THENT=T+(1.5*X2)
58025 BJ=1:W$="":GOTO49110
58100 IFZ=0ANDX7=X8THEN59030
58101 IFZ=0ANDV=8THENGOSUB59500:GOTO49110
58102 IFZ<3THENT=T+X2
58103 IFZ=3THENT=T+DD
58105 W$=YY$+"":GOSUB59800:IFX7<>X8THEN49110
58500 IFX7=X8THEN59030
58502 IFC>2THEN58600
58510 W$="":T=T−X2:GOTO49110
58600 IFZ=0THENIFX7=X8THEN59030
58610 IFZ=3THENT=T−DD
58620 IFZ<3THENT=T−X2
58630 W$="":GOTO49110
59010 T=T+X2:W$=""
59013 IFX7>21THENPRINT""W2$""X7:W$=""
59029 GOTO49110
59030 W$=""
59037 IFC=2THENIFX7=21THENW$=""
59040 GOTO49110
59050 T=T−X2:W$="":GOTO 49110
59500 IFZ=3THENT=T+DD
59510 IFZ<3THENT=T+X2
59520 W$="":IFZ>0THEN59800
59530 RETURN
59600 IFZ<3THENX2=X2*2
59605 IFZ=3THENDD=DD*2
59606 GOSUB40210:GOTO49000
59700 W$="":GOSUB51500
59720 IFJ$=""THENRETURN
59722 IFJ$=""THEN59730
59724 GOTO59700
59730 W$="":Z9=6:GOSUB51500:I=INT(X1):IFI<1ORI>25000THEN59730
59750 Z9=0:IFX7=21THENT=T+2*I:RETURN
59760 W$="":GOSUB50100:GOSUB51540
59770 T=T−I:RETURN
59800 IFZ<3THENPRINT""W7$W$"":RETURN
59810 IFZ=3THENPRINT""W7$W4$W4$W4$""W$"":RETURN
59820 RETURN
63000 W$="":Z1$="":Z2$=""
63020 PRINTZ1$"";:Z1=1
63025 GETJ$:IFJ$<>""THEN63100
63030 Z1=Z1+1:IFZ1<15THEN63025
63040 Z$=Z1$:Z1$=Z2$:Z2$=Z$:GOTO63020
63100 IFASC(J$)=13THENPRINT"";:RETURN
63110 IFASC(J$)=20THEN63200
63130 J=ASC(J$)AND127:IFJ=34ORJ=19ORJ=17ORJ=29ORJ=69THEN63020
63140 W$=W$+J$:PRINT""J$;:IFLEN(W$)=Z9THENRETURN
63160 PRINT""J$;:GOTO63020
63200 IFLEN(W$)<1THEN63000
63210 PRINTJ$;:IFLEN(W$)=1THEN63000
63220 W$=LEFT$(W$,LEN(W$)−1):GOTO63020
63999 END:REM "
READY.