1 POKE2047,67:POKE1023,66:POKE670,69
2 POKE788,52:POKE792,134:POKE793,234:POKE65091,64:POKE12340,52
3 IFPEEK(56)<>30THENPOKE56,30:POKE46,18:CLR:SYS16256
10 GOSUB900:FORI=1TO10:C0(I)=1:NEXT
20 N$(0)="":N$(1)="
30 M$(1)="":M$(2)="":M$(3)="":M$(4)="
32 POKE53280,9
34 SYS25992
35 GOSUB400:POKE53281,1:PRINT"
40 FORI=1TO200:NEXT:PRINT"
50 PRINT""
60 PRINT"
70 FORJ=0TO1:PRINTTAB(12)""N$(J):PRINTTAB(12)"
80 FORK=1TO4:PRINTTAB(11)J*4+K""M$(K):PRINT:NEXT:NEXT
85 IFPEEK(56585)>=48THENPOKE38487,1:L$="":GOSUB400:GOTO110
90 GETL$:IFL$=""THENPRINT"":GOTO40
94 GOSUB400
96 IFL$=""THENGOSUB2600:PRINT"":GOTO40
98 IFL$=""THENS(0)=0:S(1)=0:POKE53281,0:PRINT"":GOSUB575:GOTO35
100 IFL$<""ORL$>""THEN90
105 POKE38487,0
110 L=VAL(L$):IFL>4THEN200
120 POKE38400,L:POKE38401,1:GOTO205
200 POKE38400,L−4:POKE38401,2
205 PRINT""
210 SYS13255
212 PRINT""
215 S=54272:FORI=0TO20:POKES+I,0:NEXT
216 RT=PEEK(38408):IFPEEK(38487)=0THEN218
217 S(0)=0:S(1)=0:POKE53281,0:PRINT"":GOSUB1300:FORI=1TO10000:NEXT:GOTO219
218 IFRT<>2THENGOSUB500
219 GOSUB400:GOTO34
400 FORI=11TO8STEP−1:POKE56576+I,0:NEXT:RETURN
500 POKE53281,0:PRINT"":GOSUB800
520 GOSUB1100
530 FORII=0TO1:X=P(II)
540 GOSUB1300
550 IFXTHENGOSUB700:GOSUB1500
560 C0(X)=12
570 NEXT
575 FORI=1TO10:C0(I)=1:NEXT
580 PRINT"":GOSUB1300
590 PRINT
610 FORI=1TO5000:GETA$:IFA$=""THENNEXT:RETURN
650 RETURN
700 PRINT:PRINTTAB(6)"";II+1
720 PRINT:PRINTTAB(8)"
730 PRINTTAB(10)"
740 RETURN
800 FORI=0TO1
820 SL%=PEEK(38731+I):SH%=PEEK(38746+I)
830 S1%=SL%/16:S1%=SL%−6*S1%
840 S2%=SH%/16:S2%=SH%−6*S2%
850 S(I)=S2%*10000+S1%*100
860 NEXT
870 RETURN
900 FORI=1TO10:I$(I)="":TT(I)=0:NEXT
910 X=FRE(0):RETURN
1100 FORI=1TO10:C0(I)=7:NEXT
1120 FORI=0TO1:P(I)=0
1130 IFS(I)<=TT(10)THEN1200
1140 P=10
1150 IFS(I)<=TT(P−1)THEN1170
1160 P=P−1:IFP>1THEN1150
1170 IFP=10THEN1190
1180 FORJ=10TOP+1STEP−1:TT(J)=TT(J−1):C0(J)=C0(J−1):I$(J)=I$(J−1):NEXT
1190 TT(P)=S(I):C0(P)=1:P(I)=P:I$(P)=""
1200 NEXT
1202 IFP(0)=0THENRETURN
1204 IFS(0)>=S(1)THENRETURN
1206 P(0)=P(0)+1:IFP(0)>10THENP(0)=0
1210 RETURN
1300 REM SUB TO DISPLAY SCORES
1310 PRINT"
1320 PRINTTAB(17)"
1330 PRINTTAB(4)""TAB(17)""TAB(28)"
1340 PRINTTAB(4)""TAB(28)"
1350 FORI=0TO1:PRINTTAB(24*I+11−LEN(STR$(S(I))));S(I);:NEXT:PRINT
1360 PRINTTAB(13)"
1370 PRINTTAB(11)"
1380 PRINTTAB(13)"
1390 FORI=1TO10:POKE646,C0(I)
1400 PRINTTAB(11−INT(I/10));I;TAB(16);I$(I);TAB(29−LEN(STR$(TT(I))));TT(I)
1410 NEXT
1420 RETURN
1500 AS=1320+X*40:AC=AS−1024+55296:I$=""
1520 FORI=0TO2
1530 FORJ=0TO2:POKEAC+J,15:NEXT
1540 POKEAC+I,1:K=46
1550 FORL=1TO200
1560 POKEAS+I,K+128:FORH=1TO50:NEXT
1570 N%=(256+NOTPEEK(56320))AND31
1580 IFN%AND16THEN1640
1590 IFN%AND4THENK=K−1:L=1:IFK=45THENK=26
1600 IFN%AND8THENK=K+1:L=1:IFK=27THENK=46
1610 IFK<1THENK=46
1620 IFK>46THENK=1
1630 NEXTL
1635 RETURN
1640 IFK=46THENI$=I$+CHR$(K):GOTO1660
1650 I$=I$+CHR$(64+K)
1660 FORH=1TO500:NEXT:NEXTI
1670 I$(X)=I$:RETURN
2600 C=PEEK(53280)AND15
2620 C=C+1:IFC>15THENC=1
2630 POKE53280,C:RETURN
READY.