ZX81 Programs


Read about, play, run, or list games, animations, and more. These are my programs from the ’80s to today.

ZX81 Program Listing

*MOON LANDER V2*SLR/21* (mlv2.p)


SYSTEM VARIABLES

PROG  : 16509
D-FILE: 17987
VARS  : 18780
E-LINE: 18781
STKBOT: 18781
STKEND: 18781


LEGEND

A means INVERSE A
A means GRAPHICS A
PRINT means treat as KEYWORD P


PROGRAM LISTING

  10 REM *MOON LANDER V2*SLR/21*
  20 LET S=0
  30 LET SP=1
  33 LET F$="DDDDDDDDDDDDDD"
  34 LET S$="AAAAAA             
 "
  35 LET T$="SSSSSSSSSSSSSSSSSSS
S"
  40 LET F=40
  50 PRINT AT 20,0;" QE4 684 4E5
EE4 4EEEWEE QEEWE  WQ  WQ   6W  
    W            6W "
  60 LET P=INT (RND*30)
  70 PRINT AT 20,P;"   ";AT 21,P
;"FFF"
  80 LET X=0
  81 LET X1=X
  90 LET Y=15
  91 LET Y1=Y
 100 LET A$="QW"
 110 LET B$="TY"
 115 LET C$="  "
 120 LET T=0
 130 LET T=T+1
 132 PRINT AT X1,Y1;C$;AT X1+1,Y
1;C$;AT 0,1;"FUEL:";F$( TO F/4);
" ";AT 1,0;"SPEED:";
 133 IF SP<=0 THEN PRINT T$( TO
-SP*10/2);" "
 134 IF SP>0 THEN PRINT S$( TO S
P*10/2);" "
 140 PRINT AT X,Y;A$;AT X+1,Y;B$
 141 LET X1=X
 142 LET Y1=Y
 143 LET X$=INKEY$
 144 IF X$<>"" AND F>0 THEN LET
F=F-1
 145 LET SP=SP+.2
 146 IF F<=0 THEN GOTO 170
 150 LET Y=Y-(X$="Z" AND Y>0)+(X
$="." AND Y<30)
 160 IF X$="M" THEN LET SP=SP-.4
 170 LET X=X+INT (SP+.5)
 171 IF X>20 THEN LET X=20
 172 IF X<0 THEN LET X=0
 180 IF X+1>=21 THEN GOTO 200
 195 GOTO 130
 200 IF SP>1.2 THEN GOTO 250
 205 IF Y<P OR Y>P+2 THEN GOTO 2
50
 210 LET S=S+200-T+200+F
 211 PRINT AT 3,0;"YOU LANDED","
SCORE IS ";S
 212 IF INKEY$<>"" THEN GOTO 212
 213 PRINT AT 5,0;"< < PRESS A K
EY TO CONTINUE/ > >"
 220 IF INKEY$="" THEN GOTO 220
 230 CLS
 240 GOTO 30
 250 PRINT AT 3,0;"YOU CRASHED",
"SCORE IS ";S
 251 PRINT AT X1,Y1;C$;AT X1+1,Y
;C$;AT X,Y;"WD";AT X+1,Y;"HR"
 260 IF INKEY$<>"" THEN GOTO 260
 270 PRINT AT 5,0;"> > > PRESS A
 KEY TO PLAY/ < < <"
 280 IF INKEY$="" THEN GOTO 280
 290 CLS
 300 RUN
 400 SAVE "MLV2"
 410 RUN