ZX81 Programs


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

ZX81 Program Listing

*ROAD HOG ML**SLR/2012* (rhml.p)


SYSTEM VARIABLES

PROG  : 16509
D-FILE: 24606
VARS  : 25399
E-LINE: 25400
STKBOT: 25400
STKEND: 25400


LEGEND

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


PROGRAM LISTING

   0 REM MCII
30403 ?/INKEY$?INKEY$?CALL INKEY$
??INKEY$?  ??INKEY$?5PI?8PI?
INPUT PI?ERR MSGS CALL LN V284
IF INT £FAST STR$ ACS ?CAY-LN 5
PILN (INKEY$)(BLN UNPLOT RNDK;)
CONT 7LN UNPLOT RNDK=)HOME  LN
UNPLOT RNDK>2SLN UNPLOT RNDK)/=
LN 2INKEY$)CONT 7LN 2INKEY$)
HOME  LN 2INKEY$2SLN 2INKEY$21
LN 2INKEY$SGN LPRINT TAN FAST B
GOSUB DELETE LPRINT TAN Y0B
GOSUB DELETE S7W/RAND ;?5PI?J
LINE ?J?7TAN RND)5 FAST GOSUB
UNDRAW /RNDD7FAST ;FOR 5CHR$ 2
GOSUB PISTOP AT FOR GOSUB K
LPRINT 1Q2D6:RNDCLEAR QT5CLEAR Q
U7TAN LN V21COPY RETURN JFAST
GOSUB PILPRINT COS //LN V2G4IF
LN V2?RETURN COPY CSAVE 1COPY
RETURN JFAST GOSUB PILPRINT C
INPUT JERR MSGS 8COS 9EDIT LN XE
ASN DRNDTAN ACS UNPLOT 6ORNDEO
RND?NEW ?PCOS LN CALL INKEY$C
NEXT TAN YF( AND GOTO PICHAR Y1
ACS CK2Y4ACS DK2ACS EPRINT LN
INT INKEY$EACS ?K2INPUT ?CHAR )2
£UKRND<IF VAL INKEY$LET J4/2LET
KRETURN AS2INPUT ?/QY*( AND
GOTO PI?NEW 3DEF PROC VAL VAL
VAL JACS (ACS (ACS (POP LINE DD
AT CHAR DAT CHAR DGOSUB UNDRAW
£RNDD76:RNDAT Y/(MURNDY5)MTRND
TAN STR$ FAST VAL RETURN
8218 RNDACS AUTO C5LN ( /QE:RND
LN DO PI/CRETURN RNDABS JPI51RND
ACS AUTO C5LN ( /*E:RNDPRINT
LET E:RND?76:RND5TRNDPAT LPRINT
SGN TAN 7PRINT 6:RNDCLEAR QT5UU
RNDXMURNDRETURN 2ATN PUSH PILET
TAN U5RNDRETURN  CTXM5RND/AE£RND
1SAVE 2DQ?FAST LN CALL INKEY$C
CLS LPRINT RETURN CASN ES
RETURN ZC:RETURN D4EACS 0F?O4
CLS ?/INKEY$LN PUSH A/ABS ?LCOS
,LN 5PI<"/PRINT RETURN CALL SD
RETURN ""ACS R AND FPINEW Z5)1
CHAR 4RETURN 5K£RETURN 1C4
RETURN *S4JLN 5PIACS 5PI7/PRINT
NEW ZLN 5PIJ?APIINT F?MCIF LN O
CALL VAL UNDRAW PI)  STR$ FOR 7D
FOR D?+?0FOR KPLOT FOR FOR J?3
LINE ?3?OC/FOR JACS 0ACS 1?+?0
IF DCALL ?+DEF PROC ?0CHAR STOP
;STOP /<>LPRINT AT ACS ?TAB (
INKEY$TAN ERR MSGS ?*>=(INKEY$
FOR ?CCHAR ACS ?TAB (INKEY$TAN
GOSUB OFFMRNDONICLEAR ?RT GOSUB
DELETE /GOSUB DELETE /READ
END PROC GOSUB DELETE K176MRND
ACS WERR MSGS EDIT TAN LN   E-
RND7PRINT LN -DPOKE LN -DPOKE
LN SCHAR LN INPUT DEF PROC INT ?
LN RAUTO LN <>AUTO TAN LN LEN
AUTO YCODE LN RUN DEF PROC LN *
EDIT /$LN RAUTO 5  LN >ERR MSGS
7LN NEXT AUTO FAST LN LEN AUTO
LPRINT LN >ERR MSGS LN A
ERR MSGS LN LLIST A)CLEAR CALL 1
LN IF DEF PROC E?RNDLN INPUT
DEF PROC )RUN CALL 14 LN IF
DEF PROC E?RNDLN INPUT DEF PROC
LN .CHAR LN .CHAR YRUN LN RUN
DEF PROC Y?LN RUN DEF PROC LN
LET DEF PROC RETURN YTAB DRND5
LIST CALL FAST LN ESE?RNDDIM LN
POKE DEF PROC 4CLS INT ?
30455  
30386 DER II ENDAT YTAN ?BDPOKE 6
?RNDGOSUB OFF0RND<5?RNDLN OFF
DPOKE 5  6?RNDE?RND6?RNDLN A
DEF PROC WM5END PROC 5?RNDFAST
LN 7DPOKE LPRINT FAST 7776-RNDU*
RNDM5RNDLN -DPOKE RETURN PAUSE
ATN NEXT ERR MSGS RETURN RAND
ATN CHR$ UNDRAW RETURN IF ATN ,
EDIT RETURN THEN CREM RETURN
DIM ATN JDEF PROC RETURN GOTO
ATN ?DPOKE RETURN GOSUB ATN >
DPOKE RETURN FOR ATN PAUSE
UNDRAW RETURN NEXT ATN 2PROTECT
RETURN SLOW ATN ""AUTO RETURN
POKE ATN VAL UNDRAW RETURN FAST
ATN LAUTO RETURN INPUT ATN Y
PROTECT RETURN PLOT ATN DATA
EDIT RETURN UNPLOT ATN 6EDIT
RETURN LET ATN 2 RETURN CLS ATN
KUNDRAW RETURN STOP ASN £UNDRAW
RETURN PRINT ATN LET DPOKE
RETURN LPRINT ATN CHR$ DPOKE
RETURN NEW ATN 2DPOKE RETURN
COPY ATN UNPLOT ERR MSGS RETURN
REM CPROTECT RETURN SCROLL ATN P
UNDRAW RETURN RETURN ATN $
ERR MSGS RETURN CLEAR ATN A
DEF PROC RETURN  4;E-RND-DPOKE
RETURN
8202 2DEF PROC TAB QERR MSGS LN
£UNDRAW LN LEN AUTO YSLN RUN
DEF PROC ?DRNDLN HTRACE 5=RND?S
UNDRAW 5PUSH A?SUNDRAW 5?7?S
UNDRAW SCROLL RETURN ?4SGN LN
RUN DEF PROC 5/DPOKE LN SUNDRAW
/LEN 1RETURN RETURN GOSUB POP
ACS 1**?POKE DEF PROC UNTIL 7
RESTORE STR$ FOR FAST 67RND6SRND
LN .CHAR LN INPUT DEF PROC JLN
RUN DEF PROC LPRINT LN BREAK
DPOKE ..FOR SGN LN OFFDPOKE
GOSUB OFF?RNDLN OFFDPOKE FAST
GOSUB OFF?RNDBGOSUB DELETE
LPRINT **6?RND?SCROLL CHAR ?7?7
TAN RESTORE 7UNTIL 7TAN FAST AT
E0RND7LN NOSTALGIC DPOKE FOR B
GOSUB PISQR E?RNDGOSUB DELETE **
FOR 7/GOSUB Y?PRINT LN -DPOKE
LN DO PROTECT LN BREAK DPOKE
FOR LN NOSTALGIC DPOKE FOR LET ?
UUNDRAW YLN /DIM FAST SCROLL
RETURN
10249 C5PRINT LN RUN DEF PROC
LET LPRINT TAN VAL FAST E?RND
PRINT ?FAST 76?RNDLN POKE
DEF PROC RETURN D4-Y
52727 LN INPUT DEF PROC JLN RUN
DEF PROC LET A ?LN INPUT
DEF PROC /2LPRINT LET LPRINT AT
JTAN 5CLEAR ACS LN XUNDRAW 51
EXP LN XUNDRAW LN LET DPOKE 5
CLEAR ACS LN XUNDRAW 51:?X
UNDRAW LN -DPOKE RETURN
8198 ERROR LN -DPOKE RETURN
INKEY$CZRETURN
51890 "CYRETURN AT C?RETURN CHR$
ASN >=ERROR RETURN TAB ASN GOTO
ERROR RETURN ,ASN OERROR PRINT E
-RND7LET 1TERROR VAL 1  VAL 1M
TRACE VAL ?CHAR UNDRAW 5INPUT
DEF PROC LN SUNDRAW /RESEQ 5RND
TRACE LN SUNDRAW /7LN LOOP
ERROR 5IF DEF PROC LN SUNDRAW /
CHAR Y?LN BDPOKE E?RNDFAST LN X
UNDRAW 1COPY COPY LN TRACE  7
PRINT LN RUN DEF PROC LET
RETURN "C5LN BDPOKE /INPUT
LPRINT VAL GOSUB OFF?RNDLN OFF
DPOKE Y)LN UUNDRAW Y1LPRINT ?U
UNDRAW LN IUNDRAW LN SQR UNDRAW
5CALL EDIT LN XUNDRAW 5PRINT A
LN SUNDRAW LN -DPOKE RETURN ,C>
RETURN ;ASN CLS DPOKE RETURN +
ASN CLS DPOKE 5.CHAR LN SUNDRAW
JTAN 5XERROR LN SUNDRAW ?CLS
DPOKE 51RNDACS AUTO TAB :"JLN
RUN DEF PROC UTRNDRETURN )S
UNDRAW :(Y/5URND-CHAR ?PRINT A
LN ERR MSGS UNDRAW Y?LN BDPOKE 5
RUN DEF PROC LN SUNDRAW /JLN H
TRACE 5RUN ERROR LN SUNDRAW /8?
NEW 3DEF PROC 51RNDACS AUTO C:5S
RND-ACS COPY LEN WUSR ?A?2DUTRND
CHR$ 5QUNPLOT .CHAR /RY
50167 LN ABS 5IF DEF PROC LN S
UNDRAW ?.ERROR LN NOSTALGIC
DPOKE STR$ LN NOSTALGIC DPOKE
STR$ AT SGN TAN RETURN RNDABS
CONT ERR MSGS 1WRND2LN LINE
CALL RETURN 0SSRETURN RNDKTLN -
DPOKE 7/INPUT RETURN (ME
END PROC C4RETURN $4272SACS
COPY 2LN 6CHAR A ?DDGOSUB
UNDRAW ?RNDDCHAR UEEND PROC
RETURN $CARETURN (42JTAN ?TAN Y1
TAN E4RND91WRNDJMTEND PROC SY
ACS ?4KACS LIST ACS RNDFAST 5T
END PROC OASN CONT ERR MSGS
LPRINT ?FFAST LN SCROLL CHAR
LPRINT 7ACS ?CNEXT J?6DEND PROC
UTEND PROC LN DPEEK CHAR RETURN
14"Y5LN UUNDRAW 5SAVE CHAR LN S
UNDRAW UTEND PROC 55END PROC
ERROR 4S**?TAN EDEND PROC )M 
GOSUB DELETE GOSUB OFF?RNDGOSUB
DELETE SQR INT 6FAST LN
NOSTALGIC DPOKE ?NLPRINT ""
GOSUB OFF1END PROC LN OFFDPOKE )
  LN OFFDPOKE E?RNDGOSUB OFF1
END PROC ;61END PROC 1  ?COS :
LN -DPOKE LN SCHAR RETURN 1ASN
RESEQ RETURN  4SLN DPOKE ACOPY
FAST LN -DPOKE RETURN =TAB CONT
ERR MSGS LN HTRACE LPRINT ?
RETURN COPY 4£5SGN FOR LN X
UNDRAW 5OFFDPOKE ?SUNDRAW Y6?U
UNDRAW FAST 5NOSTALGIC TRACE LN
SUNDRAW LN -DPOKE LN LINE CALL
RETURN (46LPRINT LN ** 5STR$
VAL LN XUNDRAW 5DUP DEF PROC LN
SUNDRAW LN -DPOKE LN 3 5AT SGN
LN XUNDRAW 5?DEF PROC ?SUNDRAW
LN -DPOKE LN 3 LPRINT Y5LN U
UNDRAW 5?TRACE ?SUNDRAW I+FAST
LN -DPOKE RETURN (CRAND RETURN "
45LN LOOP ERROR /END WHEN
RETURN INKEY$4A5RNDTRACE LN S
UNDRAW /USER RETURN CHR$ 4"LN
ERR MSGS UNDRAW 5UTRACE LN S
UNDRAW /DELETE LN ABS /EDIT LN
SCHAR LN -DPOKE FAST LN LINE
CALL RETURN (4NLN -DPOKE LN H
TRACE E-RNDDATA LOOP LN XUNDRAW
/"LN -DPOKE RETURN TO TAB CONT
ERR MSGS LN OUNDRAW 5AUTO TRACE
LN SUNDRAW LPRINT Y5LN UUNDRAW 5
WHILE TRACE ?SUNDRAW LPRINT Y5
LN UUNDRAW 5HCHAR ?SUNDRAW 5
LINE TRACE LN SUNDRAW LN LINE
CALL RETURN )CDLPRINT X""LN -
DPOKE ?5 LN -DPOKE /FOR ?11 /D
LN POKE DEF PROC 1  GCOS £)D
END PROC >TAN B.GOSUB DELETE
ERR MSGS EDIT LIST INT FSTR$ LN
NOSTALGIC DPOKE FOR SGN ;FOR
TAN E1END PROC 65END PROC TAN ?L
COS E5END PROC FOR GOSUB KGOSUB
DO 5END PROC TAN FAST E5
END PROC GOSUB OFF1END PROC B
GOSUB DELETE FAST AT LPRINT LN
NOSTALGIC DPOKE VAL FAST LN ?
DEF PROC LPRINT AT ?7?TAN FOR TA
?RETURN  C1ACS  DRAW ?FOR 5  
ACS T3K1;FOR DFOR (PRINT TAN J
PRINT LN ERR MSGS UNDRAW LN
LINE CALL RETURN + AND RNDDRAW
RETURN ;ABS RNDDRAW YFAST LN B
DPOKE LN -DPOKE PRINT LN
ERR MSGS UNDRAW LET RETURN +C4
RETURN -47AT LINE ?RETURN  44
PRINT FAST /PEEK FAST 5ERR MSGS
EDIT LN XUNDRAW LN NEXT TRACE Y
FAST 5PUSH NOSTALGIC LN UUNDRAW
/ZPRINT VAL /0RETURN /C(RETURN *
TAB CONT ERR MSGS LN VDRAW 5)
TRACE LN SUNDRAW /BLN VDRAW 5
CLEAR DEF PROC /NEXT YLPRINT LN
BDPOKE LET RETURN  COS RETURN +C
)LN VDRAW 5BFOR LN XUNDRAW 5
GOSUB DELETE LN XUNDRAW /SCROLL
LN VDRAW Y;LN BDPOKE /<>YSGN ?B
DPOKE RETURN )4USR LN -DPOKE /
INT RETURN PEEK 4?LN ERR MSGS
UNDRAW 5A ?XUNDRAW RETURN USR 4>
LN ERR MSGS UNDRAW 5PUSH DRAW ?S
UNDRAW 1?DRAW VAL FAST TAN
NOSTALGIC PUSH TAN RETURN CODE 4
G55END PROC YELN UUNDRAW YFAST
LN BDPOKE ICOPY LN 5 YSGN LN B
DPOKE 5>DRAW /USR E5END PROC
GOSUB DO 5END PROC JGOSUB
DELETE LINE ?COS ,?TAN RETURN
RND455ARND/VRETURN ABS 4)LN
ERR MSGS UNDRAW 5ACS ?LN X
UNDRAW YCODE 5?UNDRAW ?UUNDRAW
RETURN INT ASN ERR MSGS UNDRAW
RETURN LEN 4,LN -DPOKE LN SCHAR
LN -DPOKE Y5LN UUNDRAW 5>=DRAW /
F77LN NOSTALGIC DPOKE FOR TAN
RETURN SGN 4+LN ERR MSGS UNDRAW
5LIST DRAW ?SUNDRAW ?PCOS ACS ?5
1 TAB ?UNDRAW TAN RETURN SQR
TAB CONT ERR MSGS LN ERR MSGS
UNDRAW 5SUNDRAW ?SUNDRAW JXACS ?
C2INT G?ELSE A )RND TAGOSUB
DELETE K1;ZACS >EGOSUB
CLR STACK EGOSUB CLR STACK (
LIST CLR STACK LINE TAN LN H
TRACE LN -DPOKE PRINT YFAST LN B
DPOKE LN HTRACE YSGN LN BDPOKE
LET TAN LN -DPOKE RETURN -PRINT
ATN -DPOKE RETURN (C-RETURN RNDK
$RETURN AUSR ?UNDRAW >=8UNDRAW
LET ATN ELSE UNDRAW TAN LN
TRACE DRAW /PLOT LN HTRACE /LET
5?UNDRAW /CHAR ?JLINE ?J?7TAN
LN SCHAR RETURN  ASN >DEF PROC Y
E/PLN DO PROTECT Y5/I)(BLN A
DPOKE LN $ERR MSGS U5END PROC
DEF PROC £E?RND6?RNDT4LN BDPOKE
(CLS $4PLOT LPRINT GOSUB UNDRAW
?RNDTAN 5ES/75"RNDYLN LN BDPOKE
?LN BDPOKE ??BDPOKE LN IUNDRAW
LN SQR UNDRAW 5FOR ?/GOSUB
RETURN ,TAB CONT ERR MSGS TAN
LN LINE CALL RETURN
10245 TRACE /AYE5ORNDLN UUNDRAW Y
65MRND?UUNDRAW LN -DPOKE LN S
CHAR FAST FAST LN -DPOKE LN I
UNDRAW Y7LN BDPOKE 5GOSUB DO LN
XUNDRAW LPRINT LN XUNDRAW Y677
LN UUNDRAW LPRINT GOSUB OFF?RND?
OFFDPOKE LN -DPOKE LN SCHAR
FAST FAST YELN UUNDRAW 576LN X
UNDRAW LPRINT LN XUNDRAW 77Y
GOSUB LN BDPOKE YOFFLN UUNDRAW Y
B5GOSUB DELETE LN UUNDRAW YIF
LPRINT LN NOSTALGIC DPOKE FOR ?U
UNDRAW 5  /?LN -DPOKE RETURN  
LN )TRACE LET RETURN AABS CONT
ERR MSGS RETURN 0 AND CONT
ERR MSGS CHR$ 0T DEF PROC D/ TO
FAST E-RND)5 ;6-RNDLPRINT TAN
LN -DPOKE LN SCHAR RETURN 1C1
PRINT FAST 5*EDIT LN SUNDRAW
LPRINT LET RETURN  TAB EXIT Y
FOR LN BDPOKE LN SUNDRAW Y5LN U
UNDRAW LN -DPOKE 5VPROTECT ?S
UNDRAW GOSUB UNDRAW 1END PROC
VAL FAST LN 2EDIT 61END PROC
FAST LN PAUSE PROTECT RETURN
10249 KPRINT LN $EDIT /LIST SGN
GOSUB DELETE FAST AT LPRINT LN 6
TRACE AT GOSUB CALL 1END PROC
FAST LN 2EDIT 1LN ?DEF PROC
LPRINT TAN FAST LN LET DEF PROC
LPRINT RETURN ?""J?FY
48672 £RND1SAVE 2DYL?TAN ?7Y
48672 /PAUSE LN 2EDIT FAST FAST
LN PAUSE PROTECT RETURN
10257 CARETURN 0SLET RETURN AK
GOSUB LN $EDIT /CONT 5  SGN ,
RETURN -C(RETURN LC?CHR$ 0DFAST
DDAT DT DEF PROC D</CONT SGN ,
RETURN -PRINT LN NEW PROTECT
LET ""??UNDRAW Y.PRINT LN I
UNDRAW LN SQR UNDRAW 5UNDRAW
DPOKE LN XUNDRAW YYLN BDPOKE
LET LN BDPOKE YM5KRNDLN UUNDRAW
5,RND?SUNDRAW Y4/**?PCOS ?NCOS R
TAN ?PC2RTAN ?NCOS RTAN E-RND7(C
PLOT RETURN INKEY$ASN ERR MSGS
AUTO RETURN CHR$ ASN ERR MSGS
AUTO RETURN "ASN ERR MSGS AUTO 7
LN IUNDRAW RETURN OR 4S5?EDIT
LN SUNDRAW YABS /CHAR RETURN
AND 455EEDIT /LIST PRINT YB5
GOSUB DELETE LN UUNDRAW LET
RETURN =44YTAB /GRETURN <>44Y
ASN /8RETURN >C+RETURN <4EYASN
LN 5AUTO /<RETURN >=4S5C7LN X
UNDRAW YPAUSE /ERETURN <=TAB
CONT ERR MSGS YIF LN 5AUTO LN -
DPOKE RETURN AND ASN ,EDIT TAN
LN BDPOKE ESRND7LN BREAK DPOKE
FOR LN NOSTALGIC DPOKE FOR ?X
UNDRAW LN XAUTO 65END PROC 6E
END PROC TAN E5END PROC QCOPY 7
TAN 5NOSTALGIC TRACE LN SUNDRAW
LN 3 LN -DPOKE PRINT 5NAUTO LN S
UNDRAW LN 3 5XAUTO LN SUNDRAW 52
AUTO LN SUNDRAW LET RETURN =44Y
TAB /ARETURN <>44YASN /2RETURN >
4EYASN LN 5AUTO /ARETURN <C<
RETURN >=44Y AND /ERETURN <=TAB
CONT ERR MSGS 5C7LN XUNDRAW Y
ABS ?+AUTO EEEND PROC GOSUB
UNDRAW 1END PROC SWOY""RETURN  
COS 77/POKE 5RAUTO ?SUNDRAW LN
SCROLL 25VRNDACS QTAN 5LEN AUTO
?SUNDRAW 5VRNDACS PLOT ?E252 LN
**D""FAST LN 2DEF PROC SGN ?
DATA S52 LN **D""LN 2DEF PROC
COS LN 2DEF PROC COS LOOP DATA E
£RND/SCROLL 777VAL 7777VAL LN
EXP AUTO 57 LN **DAT LN 2D7Y
28963 7AT ?7?7QREM 7?7?7TAN 77
AUTO 7ERROR D7U£RND1""U$RND0TAN
LN -DPOKE LN SCHAR Y5LN UUNDRAW
YGOSUB LN BDPOKE YOFF51END PROC
LN UUNDRAW 5OFFDPOKE LN SUNDRAW
LN HTRACE 5UNTIL DEF PROC ?S
UNDRAW 7D7FAST FAST AT E1
END PROC LN COS :AT LN DUP
DEF PROC GOSUB DO 1END PROC TAN
E1END PROC DATA LOOP <Q /7E1
END PROC ?LCOS GOSUB KTAN FAST
LN ERR MSGS UNDRAW 5GOSUB
UNDRAW LN XUNDRAW LPRINT LN X
UNDRAW 5DD?XUNDRAW LN DPOKE 5
NOSTALGIC DPOKE LN SUNDRAW 5FOR
SGN ?XUNDRAW E4RND9QCOPY FQCOPY
FQ 6DEND PROC Y5E?RNDLN UUNDRAW
I:U5END PROC LINE LN XUNDRAW 5
ATN DEF PROC ?SUNDRAW £JM5RNDT4?
7(UNPLOT $4RUN 54 6?RNDE0RND1
HOME  D61END PROC 65END PROC
TAN ?HRND?:RND?)RND?1RND?4RND
FOR ?7RNDDO ELSE   UNTIL ELSE
EXIT ELSE EEND WHEN  
   1 REM **ROAD HOG**SLR/1983***
   2 REM
30241 :)LN ATN DEF PROC 5£RND 1
FAST 5$RND)TRACE SGN ;6END PROC
WHEN LN ES5  6LOOP WHEN LN LINE
END PROC 5  6WHEN WHEN ?*5S 6
CURSOR WHEN ELOOP WHEN FAST 51 
SGN ;6LOOP WHEN 5T FAST 5+ SGN 7
GOSUB DO NOSTALGIC WHEN 6*WHEN 5
FAST ENOSTALGIC WHEN SGN BFOR
GOSUB DELETE FAST ENOSTALGIC
WHEN FAST 5S SGN ;SGN 7GOSUB DO
HOME WHEN 6DPEEK WHEN E
NOSTALGIC WHEN FAST 51 SGN BFOR
GOSUB DELETE FAST EHOME WHEN
SGN CALL EDIT LN PRINT A?TAB
END PROC  )AT END PROC 11 LN IF
DEF PROC LN .CHAR EHOME WHEN 76
HOME WHEN GOSUB OFFDPEEK WHEN B
GOSUB DELETE IF CEND PROC E
NOSTALGIC WHEN 76NOSTALGIC WHEN
GOSUB OFF*WHEN BGOSUB DELETE IF
GEND PROC 5  FAST 5  SGN CALL
EDIT LN PRINT A?4DAY:) 14 LN IF
DEF PROC ELOOP WHEN LN INPUT
DEF PROC LN .CHAR TAN 5  FAST 5L
 SGN 7GOSUB DO POP WHEN 6
CLR STACK WHEN LN INPUT DELETE
LN .DO 5< FAST ECURSOR WHEN SGN
CALL EDIT LN PRINT A?PI FGF )X15
 LN IF DEF PROC 5= FAST ECURSOR
WHEN SGN CALL EDIT LN PRINT A?
NOSTALGIC  HFH )OFF15 LN IF
DEF PROC LN .CHAR 5ELSE WHEN LN
SAVE CHAR LN NOSTALGIC TRACE LN
RNDTRACE LN LINE TRACE 5ELSE
WHEN LN ?TRACE LN NOSTALGIC
TRACE 5ELSE WHEN LN SAVE CHAR 5
ELSE WHEN LN HCHAR LN LINE
TRACE LN NAUTO ?,Z);11 LN LINE
TRACE LN XAUTO LN 2AUTO TAB TAN
ECURSOR WHEN FAST 52 SGN BGOSUB
DELETE PAUSE TAN ECURSOR WHEN
FAST 51 SGN BFOR GOSUB DELETE 6
CURSOR WHEN LN NOSTALGIC TRACE 5
ELSE WHEN LN SAVE CHAR 5ELSE
WHEN LN HCHAR LN LINE TRACE LN N
AUTO ?LLIST .)LPRINT 11 LN LINE
TRACE LN XAUTO LN 2AUTO TAB )
DELETE ECURSOR WHEN FAST 5; SGN
BGOSUB DELETE ASN )DELETE IF )
DELETE ECURSOR WHEN FAST 51 SGN
;6CURSOR WHEN 5CONT 7FAST 5M 
FAST EPOP WHEN SGN BFOR GOSUB
DELETE FAST 5C SGN LN )TRACE
SGN ;6?WHEN 51 FAST E?WHEN SGN 7
GOSUB DO ?WHEN 6
22570 76?WHEN GOSUB OFF
22695 IF YDELETE LN XLOOP E?WHEN
FAST 5< SGN BGOSUB DELETE ASN ON
DELETE ?EEWHEN WHEN FAST 5S SGN
;6WHEN WHEN 51 FAST 5  SGN CALL
EDIT LN PRINT A?8DELETE SCORE:)?
DELETE 1T LN IF DEF PROC EWHEN
WHEN LN INPUT DEF PROC LN .CHAR
52 FAST 5  SGN CALL EDIT LN
PRINT A?GDELETE CARS:)BDELETE 15
 LN IF DEF PROC EPOP WHEN LN
INPUT DEF PROC ?ZDELETE  )Y
DELETE 11 LN IF DEF PROC LN .
CHAR EPOP WHEN 76POP WHEN GOSUB
OFFCLR STACK WHEN BGOSUB DELETE
IF BEWHEN WHEN FAST 5CONT 7SGN ;
6WHEN WHEN LN LINE END PROC ?*5E
 6?WHEN LN ARND6?WHEN E?WHEN
FAST 5;;SGN LN CLEAR DEF PROC
FAST 51 SGN ;6 WHEN E WHEN FAST
5£ SGN ;6RWHEN TAN E?WHEN FAST 5
E SGN BGOSUB DELETE TAB ERROR
DO E?WHEN FAST ERWHEN SGN CALL
EDIT LN PRINT A?UDO H)TDO 11 LN
IF DEF PROC LN .CHAR E?WHEN
FAST 5D SGN BGOSUB DELETE TAB ?
DO E?WHEN FAST ERWHEN SGN CALL
EDIT LN PRINT A?DPEEK DO HH)
HOME DO 12 LN IF DEF PROC LN .
CHAR E?WHEN FAST 5" SGN BGOSUB
DELETE TAB AT DO E?WHEN FAST ER
WHEN SGN CALL EDIT LN PRINT A?<
DO GHG)(DO 17 LN IF DEF PROC E?
WHEN FAST 51 SGN ;FAST ERWHEN
SGN CALL EDIT LN PRINT A?PDO HFH
)MDO 17 LN IF DEF PROC LN .CHAR
E?WHEN FAST 5$ SGN BGOSUB
DELETE TAB >LOOP E?WHEN FAST ER
WHEN SGN CALL EDIT LN PRINT A?
STOP DO FGGF) TO DO 14 LN IF
DEF PROC E?WHEN FAST 51 SGN ;
FAST ERWHEN SGN CALL EDIT LN
PRINT A?TLOOP HFFH)2LOOP 14 LN
IF DEF PROC LN .CHAR E?WHEN
FAST 5? SGN BGOSUB DELETE TAB ON
LOOP E?WHEN FAST ERWHEN SGN
CALL EDIT LN PRINT A?OLOOP FGGF)
KLOOP 14 LN IF DEF PROC E?WHEN
FAST 51 SGN ;FAST ERWHEN SGN
CALL EDIT LN PRINT A?WHILE LOOP
HFFH)DO LOOP 14 LN IF DEF PROC
LN .CHAR E?WHEN FAST 5) SGN B
GOSUB DELETE TAB QLOOP E?WHEN
FAST ERWHEN SGN CALL EDIT LN
PRINT A?YLOOP FG7GF)QLOOP 15 LN
IF DEF PROC E?WHEN FAST 51 SGN ;
FAST ERWHEN SGN CALL EDIT LN
PRINT A?ELOOP HFFFH)9LOOP 15 LN
IF DEF PROC LN .CHAR EORND6MRND
TAN E?WHEN FAST 5) SGN BGOSUB
DELETE TAB EXP LOOP LN ATN
WHILE E?WHEN FAST 5E SGN BGOSUB
DELETE TAB RAND LOOP E?WHEN
FAST ERWHEN SGN CALL EDIT LN
PRINT A?GOSUB LOOP  )GOTO LOOP 1
1 LN IF DEF PROC LN .CHAR E?
WHEN FAST 5D SGN BGOSUB DELETE
TAB 9EXIT E?WHEN FAST ERWHEN
SGN CALL EDIT LN PRINT A?;EXIT  
 )*EXIT 12 LN IF DEF PROC LN .
CHAR E?WHEN FAST 5" SGN BGOSUB
DELETE TAB ?EXIT E?WHEN FAST ER
WHEN SGN CALL EDIT LN PRINT A?
ERROR EXIT    )CALL EXIT 17 LN
IF DEF PROC E?WHEN FAST 51 SGN ;
FAST ERWHEN SGN CALL EDIT LN
PRINT A?POP EXIT    )BREAK EXIT
17 LN IF DEF PROC LN .CHAR E?
WHEN FAST 5$ SGN BGOSUB DELETE
TAB VAL EXIT E?WHEN FAST ERWHEN
SGN CALL EDIT LN PRINT A?-EXIT  
   )>EXIT 14 LN IF DEF PROC E?
WHEN FAST 51 SGN ;FAST ERWHEN
SGN CALL EDIT LN PRINT A?TEXIT  
   )PEXIT 14 LN IF DEF PROC LN .
CHAR E?WHEN FAST 5? SGN BGOSUB
DELETE TAB -UNTIL E?WHEN FAST ER
WHEN SGN CALL EDIT LN PRINT A?
SCROLL EXIT     )STOP EXIT 14 
LN IF DEF PROC E?WHEN FAST 51 
SGN ;FAST ERWHEN SGN CALL EDIT
LN PRINT A?SUNTIL     )TUNTIL 14
 LN IF DEF PROC LN .CHAR E?WHEN
FAST 5) SGN BGOSUB DELETE TAB
PUSH UNTIL E?WHEN FAST ERWHEN
SGN CALL EDIT LN PRINT A?TUNTIL
     )OUNTIL 15 LN IF DEF PROC E
?WHEN FAST 51 SGN ;FAST ERWHEN
SGN CALL EDIT LN PRINT A?DATA
UNTIL      )WHEN UNTIL 15 LN IF
DEF PROC LN .CHAR E?WHEN FAST 52
 SGN ;6?WHEN E WHEN FAST 51 SGN
BGOSUB DELETE TAB >UNTIL ERWHEN
FAST 52 SGN BFOR GOSUB DELETE 6R
WHEN E WHEN FAST 52 SGN BGOSUB
DELETE TAB JUNTIL ERWHEN FAST 52
 SGN BFOR GOSUB DELETE 6RWHEN E 
WHEN FAST 57 SGN BGOSUB DELETE
TAB ATN UNTIL ERWHEN FAST 51 
SGN BFOR GOSUB DELETE 6RWHEN E 
WHEN FAST 55 SGN BGOSUB DELETE
TAB NEW UNTIL ERWHEN FAST 51 
SGN ;6RWHEN E WHEN FAST 5T SGN B
GOSUB DELETE TAB  WHILE ERWHEN
FAST 51 SGN ;6RWHEN TAN LN ?
END PROC 51 FAST 5  SGN CALL
EDIT LN PRINT A?,WHILE SCORE:)=
WHILE 1T LN IF DEF PROC EWHEN
WHEN LN INPUT DEF PROC LN .CHAR
5= FAST ECURSOR WHEN SGN CALL
EDIT LN PRINT A?INKEY$WHILE CRAS
H)WWHILE 15 LN IF DEF PROC LN .
CHAR 5; LN =RND5= FAST ECURSOR
WHEN SGN CALL EDIT LN PRINT A?
POP WHILE CRASH)ONWHILE 15 LN
IF DEF PROC LN .CHAR 5; LN =RND
LN NOSTALGIC TRACE LN RNDTRACE
LN LINE TRACE LN NAUTO ?FWHILE E
)GWHILE 11 LN LINE TRACE LN X
AUTO LN 2AUTO TAB 9WHILE 5>=£LN
PUSH DRAW 6HWHEN LN NOSTALGIC
TRACE LN RNDTRACE LN LINE TRACE
LN NAUTO ?OWHILE )OWHILE 1  LN
LINE TRACE LN XAUTO LN 2AUTO
ASN TAN WHILE ?QEND PROC ?G
WHILE ECURSOR WHEN FAST 51 SGN ;
FAST ECURSOR WHEN FAST 57 SGN ;
SGN 7GOSUB DO £WHEN 6:WHEN E
END PROC WHEN FAST E£WHEN FAST E
?WHEN ERR MSGS EDIT LPRINT SGN ;
FAST PUSH NOSTALGIC FAST 55 SGN
LN )TRACE FAST 51 ERR MSGS EDIT
LPRINT SGN ;FAST PUSH NOSTALGIC
SGN ;5END PROC FAST ?2WHEN  )1
WHEN 11 LN LINE TRACE SGN LN >
DRAW SGN BGOSUB DELETE ASN P
WHEN ?1WHILE E£WHEN 76£WHEN
GOSUB OFF:WHEN BGOSUB DELETE IF
CONT WHILE TAN TAN )       4?  1
       S   - - 4 4   M UHOME   S
"  T"T")   ?PROTECT   7   S     
  " :   5LET D=PEEK 16396+256*
PEEK 16397
   6 CLS
   7 LET DAY=0
   8 GOSUB 20
  10 LET SC=0
  15 GOTO 70
  20 LET X=10
  22 LET DAY=DAY+1
  30 FOR H=6 TO 21
  40 FOR G=21-H TO H+10
  45 PRINT AT H-1,G;" "
  50 NEXT G
  60 NEXT H
  62 PRINT AT 0,0;"DAY:";DAY
  65 RETURN
  70 FOR S=0 TO 49
  80 GOSUB 200
  90 GOSUB 300
 100 PRINT AT 19,X;" FGF ";AT 20
,X;" HFH "
 110 LET I$=INKEY$
 120 IF I$="Z" AND X>2 THEN LET
X=X-1
 130 IF I$="." AND X<25 THEN
LET X=X+1
 131 LET TT=1000+(50-S)*40
 135 FOR T=1 TO TT
 136 NEXT T
 140 GOSUB 400
 150 IF A<>19 THEN GOTO 90
 160 LET SC=SC+10
 161 PRINT AT 1,0;"SCORE:";SC
 162 PRINT AT 2,0;"CARS:";S;" "
 170 NEXT S
 180 LET SC=SC+1000
 190 GOSUB 20
 195 GOTO 70
 200 LET A=7
 201 REM LET R=INT (6*RND+1)
 202 REM LET MRND=USR 16550
 203 LET MRND=RND
 208 LET R=INT (MRND/6553+1)
 209 REM PRINT AT 1,15;"MRND:";M
RND;" R";R;"    "
 210 LET Q=R+12
 220 RETURN
 300 IF A=7 THEN PRINT AT A,Q;"H
"
 310 IF A=9 THEN PRINT AT A,Q;"H
H"
 320 IF A=11 THEN PRINT AT A,Q;"
GHG";AT A+1,Q;"HFH"
 330 IF A=13 THEN PRINT AT A,Q;"
FGGF";AT A+1,Q;"HFFH"
 340 IF A=15 THEN PRINT AT A,Q;"
FGGF";AT A+1,Q;"HFFH"
 350 IF A=17 THEN PRINT AT A,Q;"
FG7GF";AT A+1,Q;"HFFFH"
 370 RAND
 390 RETURN
 400 IF A=17 THEN GOSUB 600
 410 IF A=7 THEN PRINT AT A,Q;" 
"
 420 IF A=9 THEN PRINT AT A,Q;" 
 "
 430 IF A=11 THEN PRINT AT A,Q;"
   ";AT A+1,Q;"   "
 440 IF A=13 THEN PRINT AT A,Q;"
    ";AT A+1,Q;"    "
 450 IF A=15 THEN PRINT AT A,Q;"
    ";AT A+1,Q;"    "
 460 IF A=17 THEN PRINT AT A,Q;"
     ";AT A+1,Q;"     "
 470 LET A=A+2
 480 REM LET Q=Q-(2 AND R=1 OR R
=2)-(1 AND R=3)+(1 AND R=5 OR R=
6)
 481 IF R=1 THEN LET Q=Q-2
 482 IF R=2 THEN LET Q=Q-2
 483 IF R=3 THEN LET Q=Q-1
 484 IF R=5 THEN LET Q=Q+1
 485 IF R=6 THEN LET Q=Q+1
 490 RETURN
 501 GOSUB 30
 510 PRINT AT 1,0;"SCORE:";SC
 520 PRINT AT 20,X;"CRASH"
 521 PAUSE 25
 530 REM LET O=SIN PI
 540 PRINT AT 20,X;"CRASH"
 550 REM LET O=SIN PI
 551 PAUSE 25
 552 IF INKEY$="E" THEN LET L=
USR 3292
 553 IF INKEY$<>"" THEN GOTO 5
 560 GOTO 520
 600 FOR C=X+1 TO X+3
 610 IF PEEK (D+C+A*33+1)<>CODE
" " THEN GOTO 500
 620 NEXT C
 630 RETURN
 700 SAVE "RHML"
 710 LET L=USR 20500