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 2 ML*SLR/2022** (run2ml.p)


SYSTEM VARIABLES

PROG  : 16509
D-FILE: 18196
VARS  : 18989
E-LINE: 18990
STKBOT: 18995
STKEND: 18995


LEGEND

9999 means line number
PRINT means treat as KEYWORD P


PROGRAM LISTING

   1 REM /-**RUN ML***SLR/2022**
52523 MCONT PIMFOR PIWMREM PIM
INPUT PIMLOAD PI5CODE DPOKE ñRND
ñQ 7"?L4SAVE LN EúñòóLN PRINT !Y
 NOT ñ ÷LN PRINT !ö4YóNOT (
CLEAR 54CALL 6CONT PIöôVAL LN
NEXT RNDLN WINKEY$LN NINKEY$5M 
LN YPIAT (GOSUB ?STR$ RNDöô:ñLN
ñINKEY$LN ñINKEY$LN ñINKEY$TAN
VAL LN PRINT !ECONT PIöóCONT PI
AT ôTAN ñ;õLN PRINT !5HINKEY$LN
OPIñ/öLN PRINT !5JINKEY$?OPIL
COPY LLLCOPY YóñôòPRINT VAL LN
PRINT !5+INKEY$LN OPIAT ôLET X4
LOAD U£INKEY$XRETURN ñCERETURN ò
C2RETURN óC>RETURN ôCöYõM£INKEY$
TAN ñôô5$INKEY$/-ñõô5$INKEY$/:ñõ
ó5)INKEY$/öñöò5)INKEY$M£INKEY$
FAST LN PRINT !LPRINT ?OPI +20
COPY +20COPY      COPY ñ(ôLN
PRINT !5KINKEY$UREM PIB4ó5Q
INKEY$?OPIO O OCOPY I I ICOPY U
FOR PIBLN JPIYEND PROC XMFOR
PIUREM PIINPUT ñMREM PIB475CODE
DPOKE LN 8PI5=ERROR LN 8PI5CODE
DPOKE GOSUB OFF£RND<ñ4 GOSUB K5=
ERROR <ñ4 GOSUB KTAN 5HOME
ERROR LN 8PI5OERROR LN 8PI5HOME
ERROR GOSUB OFF£RND<ñ4 GOSUB K5O
ERROR <ñ4 GOSUB KTAN ö4 GOSUB K>
TAN ULOAD PIX4DEF PROC EGOTO PIñ
ú ù6GOTO PIUINPUT PIX4!5SAVE PI6
GOTO PIYôMINPUT PIEGOTO PI
RESTORE 7UNTIL 7FOR 6LIST PIFOR
RESTORE 7UNTIL 7FOR 6PAUSE PI
FOR RESTORE 7UNTIL 7FOR 6POKE PI
FOR RESTORE 7UNTIL 7FOR 6PLOT PI
FOR RESTORE 7UNTIL 5"ERROR ?5<=
ERROR ?YòMLOAD PIELIST PI)GOTO
DPOKE ñC GOSUB KEPAUSE PI)W
ERROR ñC GOSUB KEPOKE PI)£ERROR
ñC GOSUB KEPLOT PI)>=ERROR ñC 
GOSUB KTAN /SAVE   6WPILN VòGC)H
ERR MSGS EDIT LN X÷BASN >=£TAN E
WPIF?P4 THEN TAN LN VòG4IF TAN  
               ERR MSGS CALL
ELSE CALL =CALL WCALL   SLOW
CALL £ERR MSGS OERR MSGS CURSOR
ERR MSGS  ·´ERR MSGS GERR MSGS
USR ERR MSGS UNPLOT ERR MSGS µµ8
DPOKE PROTECT DPOKE ?DPOKE 0
DPOKE õõ·²ôñõ öòô·² òõñ·´ ·²  ÷ 
 ÷ ·² òõñ·´   ñó ÷ññ    ³  ·÷ô  
³     ·÷ô ·ô     ·÷ô  ·ñ· ¶   ³±
²ñóóó ·±²ñ   òóó·³ ö    óóó  òò´
 óò    ·ô  ±¶  ·ô     ±¶  ³     
 ±¶   ö ôòô  ·³ öòóóñ ³ ö    óóñ
³±²ñ   òóóñ  ö³ òô ñ ö ·ö¶ô·¶  ö
¶ ·¶·¶  ··óô  ·ó³·ô ö  ó³·± ³·öñ
  ò¶ô¶ö  ¶ñ ¶ ¶·ñ¶ µ ·ñ ·ñòô·¶ô 
¶ ò ·ñ ³ó³ öô ·óô öôöô  ôö¶   ö¶
ô³  ñ ò¶ô³ ²ô³ó   ó³ò³ñ òö òôòôö
òô õ ö  ö ¶· ´ ÷ ÷·ò  ó  ´ ÷    
ó÷ñ³ ÷´   ² ´ ÷ñ³÷´   ±   ñôµ³± 
±    ± ³±   ³³  ±÷   ±  ²³ ´÷  ´
 ñô´ ÷´ ÷  ´   ÷´ó·± ó    ±÷  ó·
±ó   ²  õò· ²³ ²    ² ²³   ²³± ²
 ´  ²   ³±÷    òô ò  ö     ·±ó ³
³    ·±ñ ·³     ó´³ô  ·³ ³ ²ô·³ 
     òóñ   ó´³  òó   ·³±ó      ¶
  ñ ·ñ     ³÷ñ·³ô    ³÷  ³ô    ò
ó²³   ³ô·± ³ ³ô      óó   òó²ô  
óñ   ³³÷ñ                       
                                
                                
                                
                                
                                
                                
                                
                                
                                
            
   2 RAND USR VAL "16514"