ZX81 Listing for ztsxxstz.p


ZX81 program listing for **ZTSXXSTZ*SLR/1984

SYSTEM VARIABLES

PROG  : 16509
D-FILE: 18233
VARS  : 19026
E-LINE: 19027
STKBOT: 19027
STKEND: 19027


LEGEND

9999 means line number
PRINT means treat as KEYWORD P


PROGRAM LISTING

  10 REM **ZTSXXSTZ*SLR/1984
  20 LET S=0
  25 LET SP=10
  30 DIM X(4)
  40 DIM Y(4)
  70 FOR A=1 TO 4
  80 LET X(A)=INT (16*RND)
  90 LET Y(A)=INT (17*RND+3)
 100 NEXT A
 110 GOTO 190
 150 FOR A=1 TO 4
 160 IF Y(A)<>27 THEN PRINT AT X
(A),Y(A);"<O>"
 170 NEXT A
 180 PRINT AT 11,13;"¶";TAB 15;"
ö";AT 13,13;"ö";TAB 15;"¶"
 185 RETURN
 190 FOR W=1 TO SP
 200 LET B=0+(INKEY$="A")-(
INKEY$="D")
 210 LET V=0+(INKEY$="W")-(
INKEY$="S")
 220 IF INKEY$="." THEN GOSUB 60
0
 230 FOR A=1 TO 4
 235 IF Y(A)=27 THEN GOTO 260
 240 LET X(A)=X(A)-(V=-1 AND X(A
)>0)+(V=1 AND X(A)<15)
 250 LET Y(A)=Y(A)-(B=-1 AND Y(A
)>3)+(B=1 AND Y(A)<20)
 260 NEXT A
 270 CLS
 280 GOSUB 150
 290 NEXT W
 300 IF Y(1)=27 AND Y(2)=27 AND
Y(3)=27 AND Y(4)=27 THEN GOTO 55
0
 305 IF RND>.25 THEN GOTO 190
 310 LET G=INT (4*RND+1)
 315 IF Y(G)=27 THEN GOTO 190
 320 LET C=X(G)+1
 330 LET U=Y(G)
 340 FOR W=1 TO 5
 350 PRINT AT C,U;"³"
 360 PRINT AT C,U-1;"µ õ"
 370 PRINT AT C,U-1;"   ";AT C+1
,U-1;"óóó"
 380 PRINT AT C,U-1;"   ";AT C+1
,U-1;"   "
 390 NEXT W
 400 IF RND>.5 THEN GOTO 190
 410 PRINT "HIT<<>>"
 420 FOR A=1 TO 50
 430 FAST
 440 SLOW
 450 NEXT A
 460 FOR A=1 TO 200
 470 SLOW
 480 FAST
 490 NEXT A
 500 PRINT AT 20,0;"PRESS A KEY 
TO PLAY AGAIN**";21,0;"SCORE:";S
 510 SLOW
 520 PAUSE 4E4
 530 RUN
 550 LET S=S+100
 560 LET SP=SP-(SP>4)
 565 PRINT AT 21,0;"SCORE:";S
 570 PAUSE 200
 590 GOTO 70
 600 FOR A=1 TO 14
 610 PRINT AT 12,A;" ";AT 12,28-
A;" "
 620 NEXT A
 630 PRINT AT 12,0;"            
                    "
 640 FOR A=1 TO 4
 650 IF X(A)=12 THEN GOTO 670
 660 GOTO 690
 670 IF Y(A)>11 AND Y(A)<15
THEN LET S=S+10
 680 IF Y(A)>11 AND Y(A)<15
THEN LET Y(A)=27
 690 NEXT A
 700 RETURN
 800 SAVE "ZTSXXSTZ"
 810 RUN