ZX81 Programs


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

ZX81 Program Listing

STAR FIGHT/SLR 1983 (starfight.p)


SYSTEM VARIABLES

PROG  : 16509
D-FILE: 17880
VARS  : 18673
E-LINE: 18674
STKBOT: 18674
STKEND: 18674


LEGEND

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


PROGRAM LISTING

  10 REM STAR FIGHT/SLR 1983
  11 LET S=0
  20 LET A$=" 568 "
  30 LET B$="  O  "
  40 LET I$=" 578 "
  50 LET D$=" 6776"
  60 LET E$="E1  24"
  70 LET F$="8    5"
  80 LET G$="24  E1"
  90 LET H$=" 7667"
 100 LET A=0
 110 LET B=0
 120 LET C$="     "
 130 LET H=1
 140 LET V=1
 150 LET A=INT (18*RND)
 160 FOR B=0 TO 27
 170 PRINT AT A,B;C$;AT A+1,B;A$
;AT A+2,B;B$;AT A+3,B;I$;AT A+4,
B;C$
 180 PRINT AT 10,26;D$;AT 11,26;
D$;AT 11,26;E$;AT 12,26;F$;AT 13
,26;G$;AT 14,26;H$
 190 LET X$=INKEY$
 200 IF X$="N" THEN LET A=A-1
AND A<>0
 210 IF X$="M" THEN LET A=A+(1
AND A<>17)
 220 IF X$="F" THEN GOTO 500
 230 NEXT B
 240 REM **END OF GAME**
 250 CLS
 260 PRINT ,,,,,,"      SCORE=";
S
 270 PRINT AT 11,6;"GAME OVER"
 280 PRINT AT 10,5;"***********"
 290 PRINT AT 11,15;"*"
 300 PRINT AT 12,5;"***********"
 310 PRINT AT 11,5;"*"
 320 PRINT AT 10,5;"***********"
 330 PRINT AT 11,15;"*"
 340 PRINT AT 12,5;"***********"
 350 PRINT AT 11,5;"*"
 360 PRINT AT 10,5;"***********"
 370 IF INKEY$<>"" THEN GOTO 400
 380 PRINT AT 12,5;"***********"
 390 GOTO 280
 400 CLS
 410 RUN
 420 REM ****TRY FOR <100>******
 500 IF A>=8 AND A<=16 THEN
GOTO 520
 510 GOTO 230
 520 IF B>=24 THEN GOTO 540
 530 GOTO 230
 540 LET S=S+1
 550 CLS
 560 GOTO 20
 600 SAVE "STARFIGHT"
 610 PRINT ,,,," ** STAR FIGHT 
**",,,"    USE N AND M TO AIM.",
"      USE F TO FIRE."
 620 PAUSE 4E4
 630 CLS
 640 RUN