ZX81 Listing for laserc.p


ZX81 program listing for *LASER CATCH**SLR/1984*

SYSTEM VARIABLES

PROG  : 16509
D-FILE: 18012
VARS  : 18805
E-LINE: 18806
STKBOT: 18806
STKEND: 18806

LEGEND

9999 is a line number
PRINT is keyword P


PROGRAM LISTING

  10 REM *LASER CATCH**SLR/1984*
  20 LET S=0
  30 LET M=0
  40 LET W=12
  50 CLS
  60 LET X=10
  70 LET Y=10
  80 LET F1=INT (31*RND+1)
  90 LET F2=INT (31*RND+1)
 100 LET F3=INT (31*RND+1)
 110 LET F4=INT (31*RND+1)
 120 IF F1=F2 OR F1=F3 OR F1=F4
OR F2=F3 OR F2=F4 OR F3=F4
THEN GOTO 80
 130 FOR G=1 TO 18
 135 PRINT AT G-1,F1;" " AND F1
<>-1;AT G-1,F2;" " AND F2<>-1;
AT G-1,F3;" " AND F3<>-1;AT G-1,
F4;" " AND F4<>-1
 140 PRINT AT X,Y;"=";AT G,F1;"!
" AND F1<>-1;AT G,F2;"¸" AND F2
<>-1;AT G,F3;"º" AND F3<>-1;AT G
,F4;"¹" AND F4<>-1
 150 PRINT AT 19,0;"ºº³³º³ºº³³³º
ººº³ºº³º³º³³º³º³ººº³";AT 20,0;"S
CORE:";S,"MISSES:";M
 160 FOR R=1 TO W
 170 LET X1=X
 180 LET Y1=Y
 190 LET X=X-(INKEY$="7" AND X>0
)+(INKEY$="6" AND X<18)
 200 LET Y=Y-(INKEY$="5" AND Y>0
)+(INKEY$="8" AND Y<31)
 210 PRINT AT X1,Y1;" " AND (X1
<>X OR Y1<>Y);AT X,Y;
 220 LET P=PEEK (PEEK 16398+256*
PEEK 16399)
 230 IF P<>CODE "=" AND P<>0
THEN GOSUB 400
 235 PRINT AT X,Y;"="
 240 NEXT R
 250 IF F1=-1 AND F2=-1 AND F3=-
1 AND F4=-1 THEN GOTO 350
 260 NEXT G
 270 PRINT AT X,Y;"*"
 280 LET M=M+1
 290 IF M<>4 THEN GOTO 50
 300 PRINT "YOUR CITY IS DEAD---
"
 310 PRINT AT 20,0;"SCORE:";S,"M
ISSES:";M
 320 PRINT AT 19,0;"ö¶¶¶ö¶ö¶¶öö¶
¶ö¶¶ö¶ööö¶¶ö¶ö¶ö¶¶¶ö"
 330 PRINT AT 21,10;"GAME OVER";
AT 21,10;"GAME OVER"
 335 IF INKEY$<>"" THEN RUN
 340 GOTO 330
 350 LET S=S+10
 360 LET W=W-1 AND W>3
 370 PRINT AT 21,0;"FORWARD==="
 380 PAUSE 100
 390 GOTO 50
 400 LET S=S+10
 410 IF P=CODE "!" THEN LET F1=-
1
 420 IF P=CODE "¸" THEN LET F2=-
1
 430 IF P=CODE "º" THEN LET F3=-
1
 440 IF P=CODE "¹" THEN LET F4=-
1
 450 RETURN
 500 SAVE "LASERC"
 510 RUN