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**SLR/1984 (ml.p)


SYSTEM VARIABLES

PROG  : 16509
D-FILE: 17330
VARS  : 18123
E-LINE: 18124
STKBOT: 18124
STKEND: 18124


LEGEND

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


PROGRAM LISTING

  10 REM **MOON LANDER**SLR/1984
  20 LET S=0
  21 DIM C$(640)
  30 LET SP=1
  40 LET F=50
  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
;"   "
  80 LET X=0
  90 LET Y=15
 100 LET A$="QW"
 110 LET B$="TY"
 120 LET T=0
 130 LET T=T+1
 131 PRINT AT 0,0;C$;AT 0,0;
STR$ SP
 140 PRINT AT X,Y;A$;AT X+1,Y;B$
 145 LET X$=INKEY$
 150 LET Y=Y-(X$="Z" AND Y>0)+(X
$="." AND Y<30)
 160 LET SP=SP+.2-(.4 AND X$="M"
)
 170 LET X=X+INT (SP+.5)
 180 IF X+1>=21 THEN GOTO 200
 191 IF F<=0 THEN GOTO 250
 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=200-T+200+F
 220 PAUSE 100
 230 CLS
 240 GOTO 30
 250 PRINT AT 0,0;"YOU CRASHED",
"SCORE IS ";S
 260 PAUSE 4E4
 270 RUN
 300 SAVE "ML"
 310 RUN