ZX81 Programs


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

ZX81 Program Listing

**E.T.**SLR/1985******* (et.p)


SYSTEM VARIABLES

PROG  : 16509
D-FILE: 21102
VARS  : 21895
E-LINE: 22007
STKBOT: 22013
STKEND: 22013


LEGEND

9999 means line number
PRINT means treat as KEYWORD P


PROGRAM LISTING

  10 REM **E.T.**SLR/1985*******
  20 LET E=900
  30 LET T=50
  40 FOR A=0 TO 21
  50 PRINT AT A,0;" ";AT A,31;" 
";AT 0,A;"          ";AT 21,A;" 
         ";AT 3,5;"±P²";AT 4,5;"
òóñ";AT 5,11;"±P²";AT 6,11;"òóñ"
;AT 8,4;"±P²";AT 9,4;"òóñ";AT 13
,5;"±P²";AT 14,5;"òóñ";AT 17,3;"
±P²";AT 18,3;"òóñ";AT 18,9;"±P²"
;AT 19,9;"òóñ"
  60 NEXT A
  70 FOR A=4 TO 8
  80 PRINT AT 12,25;"¸¸¸¸¸¸";AT
1,25;" ENRG:";AT 2,25;" >   <";
AT 3,25;"      ";AT A,25;"!    !
";AT 9,25;"!!!!!!";AT 10,25;"¸  
 TE";AT 11,25;"¸   LP"
  90 NEXT A
 100 PRINT AT 15,29;"³";AT 16,28
;"± ²";AT 17,28;" H ";AT 18,28;"
   "
 110 PRINT AT 21,0;"PRESS ENTER 
TO BEGIN GAME PLAY**"
 120 PAUSE 4E4
 130 PRINT AT 21,0;"            
                    "
 140 PRINT AT 1,17;"÷K´"
 150 LET L=SIN PI
 160 PRINT AT 1,17;"· ô";AT 2,17
;"÷K´"
 170 LET L=SIN PI
 180 FOR A=1 TO 11
 190 PRINT AT A+2,17;"÷K´";AT A+
1,17;"· ô";AT A,17;"   "
 195 LET L=SIN PI
 200 NEXT A
 210 LET L=SIN PI*SIN PI
 220 PRINT AT 12,17;"   ";AT 13,
17;"   ";AT 18,29;"K"
 230 LET X=18
 240 LET Y=29
 247 LET TI=0
 250 LET X1=X
 260 LET Y1=Y
 261 LET C=0
 262 LET PH=0
 263 LET Z=INT (RND*13+8)
 264 LET T=INT (RND*8+14)
 270 PRINT AT X,Y;"K";AT X1,Y1;"
 " AND (X1<>X OR Y1<>Y)
 272 LET X1=X
 274 LET Y1=Y
 280 LET L$=INKEY$
 290 LET X=X-(L$="A")+(L$="Z")
 300 LET Y=Y-(L$="N")+(L$="M")
 310 PRINT AT X,Y;
 320 LET P=PEEK (PEEK 16398+256*
PEEK 16399)
 330 IF P=0 OR P=176 OR P=23
THEN GOTO 400
 340 IF P=CODE "P" THEN GOSUB 50
0
 350 IF P=CODE "H" THEN GOSUB 70
0
 370 LET X=X1
 380 LET Y=Y1
 400 IF P<>CODE "P" THEN LET E=E
-1
 410 PRINT AT 2,27;E;" " AND E<1
00
 420 IF (X=Z-1 AND Y=T+1) OR C=2
THEN PRINT AT Z,T;"ú!ú"
 430 IF X=Z AND Y=24 AND C=0
THEN LET C=1
 440 IF Y=T AND X=20 AND C=1
THEN LET C=2
 450 IF E=0 THEN PRINT AT X,Y;"-
";AT 21,0;"NO ENERGY...YOU DIED*
***********";END
 460 IF TI>0 THEN GOSUB 720
 470 PRINT AT 5,19;"*" AND RND>.
8;AT 11,21;"*" AND RND>.8;AT 12,
7;"*" AND RND>.8;AT 16,12;"*"
AND RND>.8;AT 18,22;"*" AND RND
>.8
 480 IF P=CODE "*" THEN LET E=E+
(10 AND E<891)
 490 GOTO 270
 500 LET OP=INT (RND*6)
 510 FOR A=4 TO 8
 520 PRINT AT A-1,29;" " AND A>4
;AT A,29;"K"
 530 LET Y2=29
 540 NEXT A
 550 IF OP=1 THEN PRINT AT 7,27;
"-";AT 8,27;"/"
 560 IF OP=2 THEN PRINT AT 8,27;
"X"
 570 IF OP=4 THEN PRINT AT 8,27;
"0"
 580 IF OP=3 OR OP>4 THEN PRINT
AT 8,27;"¶" AND PH=0;"º" AND PH=
1;"ö" AND PH=2
 590 LET E=E-1
 600 IF INKEY$="N" THEN LET Y2=2
8
 610 IF INKEY$="A" THEN GOTO 650
 620 PRINT AT 2,27;E;" " AND E<1
00;AT 8,29;" " AND Y2=28;AT 8,Y2
;"K"
 630 IF Y2=28 AND OP=1 THEN
PRINT AT 7,27;"*";AT 8,27;"T"
 640 GOTO 590
 650 IF OP=1 AND Y2=28 THEN LET
E=900
 660 IF OP=2 THEN LET E=(E-100
AND E>99)+(0 AND E<100)
 670 IF OP=4 THEN LET E=E+(20
AND E<881)
 680 PRINT AT 7,27;"   ";AT 8,27
;"   "
 690 IF Y2=28 AND (OP=3 OR OP>4)
THEN GOTO 900
 695 RETURN
 700 IF PH=3 THEN LET TI=1 AND T
I=0
 705 IF PH<3 THEN RETURN
 710 PRINT AT 10,26;"·ôTI¸";AT 1
1,26;"òñME¸"
 720 IF TI=1 THEN PRINT AT 10,27
;"õ"
 725 LET TI=TI+1
 730 IF TI=5 THEN PRINT AT 10,27
;"ö"
 740 IF TI=10 THEN PRINT AT 10,2
7;"³"
 750 IF TI=15 THEN PRINT AT 10,2
7;"ô";AT 11,27;"ó"
 760 IF TI=20 THEN PRINT AT 11,2
7;"¶"
 770 IF TI=25 THEN PRINT AT 11,2
7;"õ"
 780 IF TI=30 THEN PRINT AT 11,2
6;"µñ"
 790 IF TI=35 THEN PRINT AT 11,2
6;"ö"
 800 IF TI=40 THEN PRINT AT 11,2
6;"ó"
 810 IF TI=45 THEN PRINT AT 11,2
6;"ò";AT 10,26;"³"
 820 IF TI=50 THEN PRINT AT 10,2
6;"¶"
 830 IF TI=55 THEN PRINT AT 10,2
6;"µ"
 840 IF TI=60 THEN PRINT AT 10,2
6;"õ¸µTE";AT 11,26;"µ õLP"
 850 IF TI=60 AND X=Z-1 AND Y=T+
1 THEN GOTO 1000
 860 IF TI=60 THEN LET TI=0
 870 RETURN
 900 LET PH=PH+(PH<3)
 910 IF PH=1 THEN PRINT AT 10,26
;"õ";AT 11,26;"µ"
 920 IF PH=2 THEN PRINT AT 10,27
;"¸";AT 11,27;" "
 930 IF PH=3 THEN PRINT AT 10,28
;"µ";AT 11,28;"õ"
 940 RETURN
1000 PRINT AT 1,T;"÷ ´"
1010 LET L=SIN PI
1020 PRINT AT 1,T;"· ô";AT 2,T;"
÷ ´"
1030 LET L=SIN PI
1040 FOR A=1 TO Z-3
1050 PRINT AT A+2,T;"÷";AT A+2,T
+2;"´";AT A+1,T;"· ô";AT A,T;"  
 "
1060 LET L=SIN PI
1070 NEXT A
1080 FOR A=Z-3 TO 1 STEP -1
1090 PRINT AT A,T;"· ô";AT A+1,T
;"÷K´";AT A+2,T;"   "
1100 LET L=SIN PI
1110 NEXT A
1120 PRINT AT 1,T;"÷K´";AT 2,T;"
   "
1130 LET L=SIN PI
1140 PRINT AT 1,T;"   "
1150 LET L=SIN PI
1160 PRINT AT 21,0;"YOU GOT E.T.
 HOME...GAME OVER***"