ZX81 Listing for faller.p


ZX81 program listing for **FALLER**SLR/1984*****

SYSTEM VARIABLES

PROG  : 16509
D-FILE: 17948
VARS  : 18741
E-LINE: 18742
STKBOT: 18742
STKEND: 18742


LEGEND

9999 means line number
PRINT means treat as KEYWORD P


PROGRAM LISTING

  10 REM **FALLER**SLR/1984*****
  20 LET S=0
  25 LET X=10
  30 LET SP=11
  40 LET X$=" V "
  50 LET B$="X"
  60 LET C$=" "
  70 FOR A=1 TO 21
  80 PRINT AT A,0;"             
                   "
  90 NEXT A
 100 LET G1=14
 110 LET G2=16
 120 LET G3=18
 130 LET G4=20
 140 LET C1=INT (15*RND+1)
 150 LET C2=INT (15*RND+1)
 160 LET C3=INT (15*RND+1)
 170 LET C4=INT (15*RND+1)
 180 IF C1=C2 OR C1=C3 OR C1=C4
OR C2=C3 OR C2=C4 OR C3=C4
THEN GOTO 150
 190 LET BU=20
 200 LET SP=SP-(SP>2)
 210 PRINT AT G1-1,C1;C$;AT G1,C
1;B$ AND C1
 220 PRINT AT G2-1,C2;C$;AT G2,C
2;B$ AND C2
 230 PRINT AT G3-1,C3;C$;AT G3,C
3;B$ AND C3
 235 PRINT AT G4-1,C4;C$;AT G4,C
4;B$ AND C4
 240 IF NOT C1 AND NOT C2 AND
NOT C3 AND NOT C4 THEN GOTO 320
 250 IF (C1 AND G1=1) OR (C2
AND G2=1) OR (C3 AND G3=1) OR (
C4 AND G4=1) THEN GOTO 350
 260 FOR U=1 TO SP
 270 PRINT AT 0,X;X$
 280 LET X=X-(INKEY$="Z" AND X>0
)+(INKEY$="." AND X<14)
 290 IF INKEY$="M" THEN GOSUB 40
0
 300 NEXT U
 301 LET G1=G1-1
 303 LET G2=G2-1
 305 LET G3=G3-1
 307 LET G4=G4-1
 310 GOTO 210
 320 LET S=S+10
 330 CLS
 340 GOTO 70
 350 PRINT AT 21,0;"YOU DIED<->S
CORE:";S
 360 PRINT AT 0,X;" - "
 365 IF INKEY$<>"" THEN GOTO 365
 370 PRINT AT 10,11;"GAME OVER"
 380 PRINT AT 10,11;"GAME OVER"
 382 IF INKEY$="" THEN GOTO 370
 384 CLS
 390 RUN
 400 LET BU=BU-1
 410 IF BU<=0 THEN RETURN
 420 IF X+1=C1 OR X+1=C2 OR X+1=
C3 OR X+1=C4 THEN GOTO 440
 430 RETURN
 440 IF X+1=C1 THEN LET C1=0
 450 IF X+1=C2 THEN LET C2=0
 460 IF X+1=C3 THEN LET C3=0
 470 IF X+1=C4 THEN LET C4=0
 480 LET S=S+10
 490 RETURN
 500 SAVE "FALLER"
 510 RUN