ZX81 Programs


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

ZX81 Program Listing

*ENLARGER ASM**SLR/22* (enlarger.p)


SYSTEM VARIABLES

PROG  : 16509
D-FILE: 18547
VARS  : 19340
E-LINE: 19341
STKBOT: 19346
STKEND: 19346


LEGEND

9999 means line number
PRINT means treat as KEYWORD P


PROGRAM LISTING

   1 REM /*ENLARGER ASM**SLR/22*
30413 LN Eú51INKEY$LN GOTO RND5
THEN INKEY$LN GOTO RND5N
ERR MSGS LN GOTO RND5RND3LN 7
INKEY$5 THEN INKEY$LN ?INKEY$ñ  
LN PRINT !5ACS ERR MSGS LN GOTO
RND5RND3LN 7INKEY$59PILN ?INKEY$
5RND3LN 7INKEY$5ELSE CALL LN ?
INKEY$5RND3LN 7INKEY$?2RND/SAVE
GOSUB OFF£RND<5ELSE DPOKE ñCHR$
òGOSUB KTAN )ELSE DPOKE E£RND
CHR$ òGOSUB KTAN )5 5PI Y+ñ5 
GOSUB SXTAB *INKEY$TAN   65
INKEY$LN VòGC)HERR MSGS EDIT LN
X÷BASN >=£TAN E5INKEY$F?P4 THEN
TAN LN VòG4IF TAN )ELSE DPOKE E£
RND7ö"VAL ö(VAL ?ñ4 ù?7?LPRINT 7
7FOR AT (REM ñ) ùFOR ñ6 ùFOR AT
( AND ?POKE RNDFAST LN LPRINT
LN GOTO RND5POKE ñLN 7INKEY$öõ
VAL LN EDIT INKEY$5POKE ñLN 7
INKEY$AT (NEXT TAN WE SHALL ENLA
RGE A PICTURE OF A MOON.        
                   COPY         
                        
 128                            
 
32896                            
 
32896                            
 
 128                            
 
   0                            
 
65280                            
  
 128                            
 
32776                            
 
32896                            
 
 128                            
 
   0                            
 
65408                            
  
 128                            
 
32896                            
 
   8 !                          
 
 128                            
 
32768                            
 
65332  TO ENLARGE THE MOON WE WIL
L TAKE EACH SQUARE AND MULTIPLY 
ITBY 4 MAKING A LARGER PICTURE. 
                                
  PRESS ENTER TO BEGIN...COPY TH
AT WAS A SCALE ENLARGEMENT OF A 
MOON.  NOT VERY SPECTACULAR,  BU
T, IF ONE COULD MODIFY THIS   SI
MPLE PROGRAM, THE EFFECT COULDBE
 BOTH USEFUL AND SPECTACULAR.
65280                            
  
   0                            
 
   0                            
 
   0                            
 
   0                            
 
   0                            
 
   0                            
 
   0                            
 
   0                            
 
   0                            
 
   0                            
 
   0                            
 
   0                            
 
   0                            
 
   0                            
 
   0                            
 
   0                            
 
   0                            
 
   0                            
 
   0                            
 
   0                            
 
   0                            
 
   0                            
 
30208  RAND USR VAL "16514"