ZX81 Listing for electon.p


ZX81 program listing for **ELECTON****SLR/1983**

SYSTEM VARIABLES

PROG  : 16509
D-FILE: 17695
VARS  : 18488
E-LINE: 18489
STKBOT: 18489
STKEND: 18489


LEGEND

9999 means line number
PRINT means treat as KEYWORD P


PROGRAM LISTING

   5 REM **ELECTON****SLR/1983**
   7 CLS
  10 LET S=0
  20 LET X1=1
  21 FOR A=0 TO 21
  22 PRINT AT A,0;" ";AT A,31;" 
";AT 0,A;"          ";AT 21,A;" 
         "
  23 NEXT A
  30 LET X2=15
  40 LET Y1=10
  50 LET Y2=15
  60 LET S1=Y1
  70 LET S2=Y2
  80 PAUSE 100
  90 PRINT AT X1,X2;"!";AT Y1,Y2
;"*"
 100 PRINT AT S1,S2;" " AND (S1
<>Y1 OR S2<>Y2)
 110 LET S1=Y1
 120 LET S2=Y2
 125 FOR L=1 TO 3
 130 LET Y1=Y1+(INT (RND*3-1))
 140 LET Y2=Y2+(INT (RND*3-1))
 145 PRINT AT Y1,Y2;
 150 LET P=PEEK (PEEK 16398+256*
PEEK 16399)
 151 IF P=0 OR P=151 OR P=8
THEN GOTO 160
 152 NEXT L
 153 GOTO 300
 160 IF Y1=X1 AND Y2=X2 THEN
GOTO 400
 161 LET O1=X1
 162 LET O2=X2
 170 LET X1=X1-(INKEY$="Z")+(
INKEY$="X")
 180 LET X2=X2-(INKEY$="N")+(
INKEY$="M")
 190 IF X1>=21 AND X1<=0 THEN
GOTO 400
 200 IF X2>=31 AND X2<=0 THEN
GOTO 400
 205 PRINT AT X1,X2;
 210 LET P=PEEK (PEEK 16398+256*
PEEK 16399)
 215 IF P<>0 AND P<>8 THEN GOTO
400
 216 LET S=S+1
 217 PRINT AT O1,O2;" " AND (O1
<>X1 OR O2<>X2)
 220 GOTO 90
 230 REM ***********************
 300 LET S=S+100
 320 PRINT AT 15,10;"SCORE:";S
 330 PAUSE 500
 340 CLS
 350 GOTO 20
 400 PRINT AT X1,X2;"X";AT 20,0;
"SCORE:";S
 405 IF INKEY$<>"" THEN GOTO 405
 410 PRINT AT 10,0;"CRASH"
 415 IF INKEY$<>"" THEN RUN
 420 PRINT AT 10,0;"CRASH"
 430 GOTO 410
 500 SAVE "ELECTON"
 510 RUN