ZX81 Programs


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

ZX81 Program Listing

**CAN PUNCH**SLR/1984** (cp.p)


SYSTEM VARIABLES

PROG  : 16509
D-FILE: 18079
VARS  : 18872
E-LINE: 18980
STKBOT: 18986
STKEND: 18986


LEGEND

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


PROGRAM LISTING

  10 REM **CAN PUNCH**SLR/1984**
  20 PRINT "    =-=-=  CAN PUNCH
  =-=-="
  30 PRINT AT 10,0;"            
                    ";AT 8,0;". 
";AT 9,0;"RE"
  31 LET L=11
  32 FOR A=31 TO 16 STEP -4
  33 FOR Z=31-A TO A
  34 PRINT AT L,Z;" "
  35 NEXT Z
  37 LET L=L+1
  39 NEXT A
  40 LET S=0
  50 LET R=5
  70 LET H1=INT (2*RND+3)
 100 DIM A$(4,2)
 110 LET A$(1)="S "
 120 LET A$(2)="D "
 130 LET A$(3)=" 7"
 140 LET A$(4)=" 6"
 150 LET F=1
 160 PRINT AT 5,27;"A";AT 6,25;A
$(F);" ";AT 7,26;"2 ";AT 8,27;" 
";AT 9,26;"E "
 170 PRINT AT 18,7;"=+=+=  READY
  =+=+="
 180 PAUSE 200
 190 PRINT AT 18,7;"            
       "
 200 PRINT AT 7,0;"67"
 210 LET L=SIN PI
 220 PRINT AT 6,0;" T";AT 7,0;"T
 "
 230 LET L=SIN PI
 240 PRINT AT 6,0;"8 ";AT 7,0;"5
Q"
 250 LET L=SIN PI
 260 PRINT AT 6,0;"5Q";AT 7,0;"5
 E"
 270 LET L=SIN PI
 280 PRINT AT 5,0;" Q";AT 6,0;"5
 E";AT 7,0;"5A "
 290 LET L=SIN PI
 300 LET C=3
 310 LET O=R
 320 FOR C=3 TO 24
 330 LET O=O-1
 350 IF O=0 THEN LET H1=INT (2*
RND+3)
 370 IF O=0 THEN LET O=R
 390 PRINT AT 6,C;A$(H1)
 400 LET F=F-(INKEY$="Z" AND F=2
)+(INKEY$="." AND F=1)
 410 PRINT AT 6,25;A$(F)
 420 NEXT C
 430 IF H1-2=F THEN GOTO 500
 440 PRINT AT 6,25;"YGF"
 450 PRINT AT 18,4;"=+=+=  YOU M
ISSED  =+=+="
 460 PRINT AT 20,4;"YOU SCORED "
;S;" POINTS."
 470 STOP
 500 LET S=S+100
 510 PRINT AT 18,7;"=-=-=  GO ON
 =-=-="
 520 PAUSE 200
 530 PRINT AT 5,0;"  ";AT 6,0;" 
  ";AT 7,0;"  "
 540 LET R=R-(R>0)
 550 GOTO 170