ZX81 Programs


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

ZX81 Program Listing

PICTURE IN MOTION*SLR/2021 (pim.p)


SYSTEM VARIABLES

PROG  : 16509
D-FILE: 18603
VARS  : 19396
E-LINE: 19397
STKBOT: 19397
STKEND: 19397


LEGEND

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


PROGRAM LISTING

   1 REM /P BY STEVEN REID 2021 
* * PICTURE IN MOTION * *
30208   5  6ORND6QRND6RRNDLN +
INKEY$RETURN QASN ,INKEY$LN
DPEEK INKEY$5  6ORND5RINKEY$LN 1
INKEY$EQRND6ORND5 STEP INKEY$LN
1INKEY$LN EDIT INKEY$USRNDBTAB T
INKEY$URRNDXMRRNDRETURN RETURN
TAB VAL RNDY1MSRND?VAL RNDURRNDW
MRRNDRETURN  TAB VAL RNDY MSRND?
VAL RND?>=£ORND MUDPOKE 7ERROR U
PRND MVDPOKE 7ERROR UORND MW
DPOKE 7ERROR UPRND MXDPOKE 7
FAST LN ERR MSGS LPRINT ?1INKEY$
GOSUB OFF£RND5GDPOKE 1NOT 2
GOSUB KTAN )GDPOKE E£RND1NOT 2
GOSUB KTAN )Z 5NOSTALGIC Y-1
GOSUB SXTAB ?INKEY$TAN S1  M?
INKEY$EORNDDF?NEW ?LINE 6?INKEY$
U?INKEY$CHAR LN BINKEY$LN V2
ERR MSGS EDIT =Y1COS LN XEINKEY$
XCHAR : " ?L4IF TAN  -A-P-RND-44
D4A4S5D5DEDTEAAA4A4A2E2E2T2T45
COPY ;AXAWARDRD2D2D;BKAKAKAH"H"K
"K£,7,7W7V7K£COPY LN /PIUMDPOKE
ACS DEF PROC TAB QPILN ?PITAN UO
DPOKE ACS ?""CHR$ RNDLIST UP
DPOKE ACS ?""CHR$ ILIST Y MQ
DPOKE UODPOKE ACS ZMODPOKE K5Y1M
QDPOKE UPDPOKE ACS ZMPDPOKE KAUQ
DPOKE ACS INT MQDPOKE 5GDPOKE 7)
5 UPDPOKE RETURN  C4CHAR ;(
CLEAR )  UODPOKE READ ;6RDPOKE
TAN ERDPOKE UQDPOKE RETURN  C$
RETURN 1C-RETURN 2C3RETURN 7CC
TAN SIN ?TAN ACS E?TAN INT ?TAN
ACS ??TAN NOT ?TAN ACS *?TAN
INPUT E?TAN ERDPOKE UQDPOKE
RETURN  C$RETURN 1C-RETURN 2C3
RETURN 7CCTAN E?TAN ACS SIN ?
TAN ??TAN ACS INT ?TAN *?TAN
ACS NOT ?TAN INPUT E?TAN TAN UY
DPOKE CHAR URNDDPOKE (MPIDPOKE U
ZDPOKE CHAR UINKEY$DPOKE (MCALL
DPOKE 5ERR MSGS DPOKE Q1UPI
DPOKE ACS ?C$YCOPY MERR MSGS
DPOKE UPIDPOKE GOSUB ERR MSGS M
PIDPOKE UCALL DPOKE CHAR UPI
DPOKE ACS B(MERROR DPOKE UY
DPOKE MCHAR DPOKE UZDPOKE M
DPOKE CHAR UINKEY$DPOKE (CCHAR
VAL U DPOKE MPDPOKE WM DPOKE U
CHAR DPOKE MODPOKE LN DPIUERROR
DPOKE ACS ?43UERR MSGS DPOKE
CHAR UCHAR DPOKE  MCHAR DPOKE U
CALL DPOKE CHAR UPIDPOKE (ACS B
CHAR UERROR DPOKE  MERROR DPOKE
/$UPIDPOKE ACS BCHAR UERROR
DPOKE  MERROR DPOKE AT (Q5M
DPOKE ACS :TAN UUDPOKE MODPOKE U
VDPOKE MPDPOKE LN DPITAN UY
DPOKE CHAR URNDDPOKE (MPIDPOKE U
ZDPOKE CHAR UINKEY$DPOKE (MCALL
DPOKE 5DPOKE DPOKE Q1ACS ?C$Y
COPY MDPOKE DPOKE UCALL DPOKE
GOSUB ERR MSGS MCALL DPOKE UPI
DPOKE CHAR UCALL DPOKE ACS B(M
ERROR DPOKE UZDPOKE M DPOKE UY
DPOKE MCHAR DPOKE CHAR URND
DPOKE (C8CHAR VAL UCHAR DPOKE MO
DPOKE WMCHAR DPOKE U DPOKE MP
DPOKE LN DPIUERROR DPOKE ACS ?43
UDPOKE DPOKE CHAR U DPOKE  M
DPOKE UPIDPOKE CHAR UCALL DPOKE
(ACS BCHAR UERROR DPOKE  MERROR
DPOKE /$UCALL DPOKE ACS BCHAR U
ERROR DPOKE  MERROR DPOKE AT (Q5
MDPOKE ACS :TAN 5MDPOKE ACS EXP
UUDPOKE MYDPOKE UWDPOKE MRND
DPOKE UVDPOKE MZDPOKE UXDPOKE M
INKEY$DPOKE UVDPOKE CHAR UX
DPOKE (K2GOSUB ERR MSGS
DEF PROC UUDPOKE CHAR UWDPOKE (K
2GOSUB ERR MSGS )S)UWDPOKE CHAR
UUDPOKE ( AND JCALL LN B
ERR MSGS ?JCALL UXDPOKE CHAR UV
DPOKE ( AND COPY PILN BERR MSGS
?COPY PIUVDPOKE CHAR UXDPOKE MZ
DPOKE ?MINKEY$DPOKE UUDPOKE
CHAR UWDPOKE MYDPOKE ?MRNDDPOKE
TAN CHR$ RNDRETURN RNDKS5TRACE
DPOKE )  READ ;CHR$ RND5HDPOKE )
  READ RZGOSUB DELETE CHR$  5
TRACE DPOKE )  READ ;5HDPOKE )  
READ RZGOSUB DELETE ZRETURN  C3
CHAR UTDPOKE 5  ?FAST SGN ;(
CLEAR TEACS XACS WK2ACS CLEAR (
PLOT ACS ?COS ?GOSUB ERR MSGS ?
TAN                         7TD£
(<-;0369CFILNQTWZINKEY$ERR MSGS
CHAR TRACE PROTECT AUTO DO EXIT
WHEN RESEQ CURSOR RESTORE
NOSTALGIC *HOME DPEEK POP
CLR STACK DUP END WHEN ??????
30841 ????
   0                            
 
   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 16569
   3 STOP
   4 SAVE "PIM"
   5 RUN