ZX81 Programs


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

ZX81 Program Listing

*TRENCHRUNNER-V1*SLR/1984* (trenchrunner1.p)


SYSTEM VARIABLES

PROG  : 16509
D-FILE: 17284
VARS  : 18077
E-LINE: 18078
STKBOT: 18078
STKEND: 18078


LEGEND

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


PROGRAM LISTING

   5 REM *TRENCHRUNNER*SLR/1984*
  10 LET X=15
  11 GOSUB 20
  12 GOTO 70
  20 PRINT AT 0,0;"          AAA
AAAAAAAAA          "
  30 PRINT AT 1,0;"AAAAAAAAAA   
         AAAAAAAAAA"
  40 PRINT AT 2,0;"          AAA
AAAAAAAAA          "
  50 PRINT AT 3,0;"AAAAAAAAAA   
         AAAAAAAAAA"
  60 PRINT AT 4,0;"          AAA
AAAAAAAAA          "
  65 RETURN
  70 FOR A=1 TO 100
  80 LET Y=INT (12*RND)+10
  90 FOR G=0 TO 4
 100 GOSUB 20
 110 PRINT AT 4,X;"H";AT G,Y;"O"
 120 LET X=X-(INKEY$="Z")+(
INKEY$=".")
 125 PRINT AT 4,X;
 130 LET P=PEEK (PEEK 16398+256*
PEEK 16399)
 140 IF P=128 THEN GOTO 200
 150 IF P=180 THEN GOTO 200
 160 NEXT G
 170 NEXT A
 180 PRINT "YOU WIN"
 190 GOTO 210
 200 PRINT "YOU DIED:";A
 210 PRINT "...PRESS A KEY TO PL
AY AGAIN... "
 220 PAUSE 4E4
 230 CLS
 240 RUN
 300 SAVE "TR"
 310 RUN