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


SYSTEM VARIABLES

PROG  : 16509
D-FILE: 17136
VARS  : 17929
E-LINE: 17930
STKBOT: 17930
STKEND: 17930


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=CODE "?"
  11 FOR A=X/X TO CODE "M"
  20 PRINT AT X-X,X-X;"         
 AAAAAAAAAAAA          "
  30 PRINT AT X/X,X-X;"AAAAAAAAA
A            AAAAAAAAAA"
  40 PRINT AT 2,X-X;"          A
AAAAAAAAAAA          "
  50 PRINT AT 3,X-X;"AAAAAAAAAA 
           AAAAAAAAAA"
  60 PRINT AT 4,X-X;"          A
AAAAAAAAAAA          "
  80 LET Y=INT (CODE "£"*RND)+
CODE "S"
  90 FOR G=X-X TO CODE "4"
 110 PRINT AT CODE "4",X;"H";AT
G,Y;"O"
 120 LET X=X-(INKEY$="Z")+(
INKEY$=".")
 125 PRINT AT CODE "4",X;
 130 LET P=PEEK (PEEK 16398+256*
PEEK 16399)
 140 IF P=CODE " " THEN GOTO
CODE "COS "
 150 IF P=CODE "O" THEN GOTO
CODE "COS "
 160 NEXT G
 170 NEXT A
 180 PRINT "YOU WIN"
 200 PRINT "SCORE:";A
 210 PRINT "...PRESS A KEY TO PL
AY AGAIN... "
 220 PAUSE 4E4
 230 CLS
 240 RUN
 300 SAVE "TR"
 310 RUN