ZX81 Programs


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

ZX81 Program Listing

**RUN 3 ML*SLR/2022** (run3ml.p)


SYSTEM VARIABLES

PROG  : 16509
D-FILE: 18232
VARS  : 19025
E-LINE: 19026
STKBOT: 19031
STKEND: 19031


LEGEND

9999 means line number
PRINT means treat as KEYWORD P


PROGRAM LISTING

   1 REM /-**RUN 3 ML*SLR/2022**
52523 M£CALL M?CALL WM:CALL M>
CALL M<CALL YõM2INKEY$5CONT
DPOKE ñRNDñQ 7"?L4SAVE LN Eúñòó
LN PRINT !Y NOT ñ ÷LN PRINT !ö4Y
óNOT (CLEAR 5ERR MSGS CALL 6£
CALL öôVAL LN SAVE RNDLN STEP
INKEY$LN JINKEY$5M LN LLIST PI
AT (GOSUB ? AND RNDöô:ñLN ö
INKEY$LN öINKEY$LN öINKEY$TAN
VAL LN PRINT !E£CALL öó£CALL AT
ôTAN ñ;õLN PRINT !5MINKEY$LN **
PIñ/öLN PRINT !5OINKEY$?**PIL
COPY LLLCOPY U2INKEY$XRETURN ñC
ERR MSGS RETURN òCMRETURN óC4
RETURN ôC:Yõ5,ó6HINKEY$ñôò?(
INKEY$ñôóLN (INKEY$ñôô53INKEY$/I
ñôôLN (INKEY$ñõô53INKEY$/4ñôôLN
(INKEY$ñõó57INKEY$/>ñôóLN (
INKEY$ñöò57INKEY$M2INKEY$5B
INKEY$FAST LN PRINT !LPRINT ?**
PI +20COPY +20COPY      COPY
GOSUB UNDRAW HINKEY$$?RETURN ó4ó
?SINKEY$GOSUB CALL HINKEY$LN
PRINT !5ABS INKEY$U:CALL B4ó5
OR INKEY$?**PIO O O COPY I I I 
COPY U?CALL BLN DO PIY
END PROC XM?CALL U:CALL INPUT ñM
:CALL B475CONT DPOKE LN PI5S
ERROR LN PI5CONT DPOKE GOSUB
OFF£RND<ñ4 GOSUB K5SERROR <ñ4 
GOSUB KTAN 5¸ERROR LN PI5**
ERROR LN PI5¸ERROR GOSUB OFF£
RND<ñ4 GOSUB K5**ERROR <ñ4 
GOSUB KTAN ö4 GOSUB K>TAN U<
CALL X4DEF PROC E(CALL ñú ù6(
CALL U>CALL X4!50CALL 6(CALL YôM
>CALL E(CALL RESTORE 7UNTIL 7
FOR 6=CALL FOR RESTORE 7UNTIL 7
FOR 6-CALL FOR RESTORE 7UNTIL 7
FOR 6/CALL FOR RESTORE 7UNTIL 7
FOR 6,CALL FOR RESTORE 7UNTIL 5J
ERROR ?5COPY ERROR ?YòM<CALL E=
CALL )(ERROR ñC GOSUB KE-CALL )
NOSTALGIC ERROR ñC GOSUB KE/
CALL )KERROR ñC GOSUB KE,CALL ) 
CHAR ñC GOSUB KTAN /SAVE   6
STEP PILN VòGC)HERR MSGS EDIT
LN X÷BASN >=£TAN E STEP PIF?P4
THEN TAN LN VòG4IF TAN         
        POP CALL (CALL SCALL
STEP CALL   !ERR MSGS K
ERR MSGS WHEN ERR MSGS  
ERR MSGS  ·CERR MSGS SQR
ERR MSGS SAVE ERR MSGS 4DPOKE µµ
DPOKE ?DPOKE /DPOKE ""DPOKE õõ·
²ôñõ öòô·² òõñ·´ ·²  ÷  ÷ ·² òõñ
·´   ñó ÷ññ    ³  ·÷ô  ³     ·÷ô
 ·ô     ·÷ô  ·ñ· ¶   ³±²ñóóó ·±²
ñ   òóó·³ ö    óóó  òò´ óò    ·ô
  ±¶  ·ô     ±¶  ³      ±¶   ö ô
òô  ·³ öòóóñ ³ ö    óóñ³±²ñ   òó
óñ  ö³ òô ñ ö ·ö¶ô·¶  ö¶ ·¶·¶  ·
·óô  ·ó³·ô ö  ó³·± ³·öñ  ò¶ô¶ö  
¶ñ ¶ ¶·ñ¶ µ ·ñ ·ñòô·¶ô ¶ ò ·ñ ³ó
³ öô ·óô öôöô  ôö¶   ö¶ô³  ñ ò¶ô
³ ²ô³ó   ó³ò³ñ òö òôòôöòô õ ö  ö
 ¶· ´ ÷ ÷·ò  ó  ´ ÷    ó÷ñ³ ÷´  
 ² ´ ÷ñ³÷´   ±   ñôµ³± ±    ± ³±
   ³³  ±÷   ±  ²³ ´÷  ´ ñô´ ÷´ ÷
  ´   ÷´ó·± ó    ±÷  ó·±ó   ²  õ
ò· ²³ ²    ² ²³   ²³± ² ´  ²   ³
±÷    òô ò  ö     ·±ó ³³    ·±ñ 
·³     ó´³ô  ·³ ³ ²ô·³      òóñ 
  ó´³  òó   ·³±ó      ¶  ñ ·ñ   
  ³÷ñ·³ô    ³÷  ³ô    òó²³   ³ô·
± ³ ³ô      óó   òó²ô  óñ   ³³÷ñ
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
   
   2 RAND USR VAL "16514"