ZX81 Listing for gq2016.p


ZX81 program listing for Gem Quest 2016

SYSTEM VARIABLES

PROG  : 16509
D-FILE: 30070
VARS  : 30863
E-LINE: 30864
STKBOT: 30864
STKEND: 30864

LEGEND

9999 is a line number
PRINT is keyword P


PROGRAM LISTING

   0 REM MCII
30403 ?/INKEY$?INKEY$?CALL INKEY$
??INKEY$?  ??INKEY$PI?8PI?
INPUT PI?ERR MSGS CALL LN Vò84
IF INT £FAST STR$ ACS ?C!Y-LN õ
PILN (INKEY$)(BLN UNPLOT RNDK;)
CONT óLN UNPLOT RNDK=)HOME  LN
UNPLOT RNDK>2úLN UNPLOT RNDK)/=
LN òINKEY$)CONT óLN òINKEY$)
HOME  LN òINKEY$LN òINKEY$
LN òINKEY$SGN LPRINT TAN FAST B
GOSUB DELETE LPRINT TAN Y0B
GOSUB DELETE SóW/RAND ;?õPI?J
LINE ?J?7TAN RND)5 FAST GOSUB
UNDRAW /RNDù7FAST ;FOR 5CHR$ ò
GOSUB PISTOP AT FOR GOSUB K
LPRINT ñQòù6:RNDCLEAR QT5CLEAR Q
TAN LN VòñCOPY RETURN JFAST
GOSUB PILPRINT COS //LN VòG4IF
LN Vò?RETURN COPY CSAVE ñCOPY
RETURN JFAST GOSUB PILPRINT C
INPUT JERR MSGS 8COS 9EDIT LN X÷
ASN DRNDTAN ACS UNPLOT 6ORNDEO
RND?NEW ?PCOS LN CALL INKEY$C
NEXT TAN YF( AND GOTO PICHAR Yñ
ACS CKòYôACS DKòACS ÷PRINT LN
INT INKEY$÷ACS ?KòINPUT ?CHAR )2
£UKRND<IF VAL INKEY$LET J4LET
KRETURN !SòINPUT ?/QY*( AND
GOTO PI?NEW 3DEF PROC VAL VAL
VAL JACS (ACS (ACS (POP LINE DD
AT CHAR ùAT CHAR ùGOSUB UNDRAW
£RNDù76:RNDAT Y/(MURNDY5)MTRND
TAN STR$ FAST VAL RETURN
8218 RNDACS AUTO CõLN ( /QE:RND
LN DO PI/CRETURN RNDABS JPIRND
ACS AUTO CõLN ( /*E:RNDPRINT
LET E:RND?76:RND5TRNDPAT LPRINT
SGN TAN 7PRINT 6:RNDCLEAR QT5UU
RNDXMURNDRETURN òATN PUSH PILET
TAN U5RNDRETURN  CöXM5RND/AE£RND
ñSAVE òùQ?FAST LN CALL INKEY$C
CLS LPRINT RETURN CASN
RETURN ZC:RETURN D4÷ACS 0F?O4
CLS ?/INKEY$LN PUSH !/ABS ?LCOS
,LN õPI<"/PRINT RETURN CALL Sù
RETURN ""ACS R AND FPINEW Z5)ñ
CHAR ôRETURN 5K£RETURN ñCô
RETURN *SôJLN õPIACS õPI7/PRINT
NEW ZLN õPIJ?!PIINT º?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 ùCALL ?+DEF PROC ?0CHAR STOP
;STOP /<>LPRINT AT ACS ?TAB (
INKEY$TAN ERR MSGS ?*>=(INKEY$
FOR ?CCHAR ACS ?TAB (INKEY$TAN
GOSUB OFFMRNDONICLEAR ?Rö GOSUB
DELETE /GOSUB DELETE /READ
END PROC GOSUB DELETE Kñ76MRND
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
óLN NEXT AUTO FAST LN LEN AUTO
LPRINT LN >ERR MSGS LN A
ERR MSGS LN LLIST !)CLEAR CALL ñ
LN IF DEF PROC E?RNDLN INPUT
DEF PROC )RUN CALL ñô 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 EúE?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 WMõEND 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 ¶
PROTECT RETURN PLOT ATN DATA
EDIT RETURN UNPLOT ATN ³EDIT
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 òDPOKE 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 !?SUNDRAW 5?ó?S
UNDRAW SCROLL RETURN ?4SGN LN
RUN DEF PROC 5/DPOKE LN SUNDRAW
/LEN ñRETURN RETURN GOSUB POP
ACS 1**?POKE DEF PROC UNTIL 7
RESTORE STR$ FOR FAST 67RNDRND
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 PRINT 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 /òLPRINT LET LPRINT AT
JTAN 5CLEAR ACS LN XUNDRAW 5ñ
EXP LN XUNDRAW LN LET DPOKE 5
CLEAR ACS LN XUNDRAW 5ñ:?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 ñTERROR VAL ñ  VAL ñM
TRACE VAL ?CHAR UNDRAW 5INPUT
DEF PROC LN SUNDRAW /RESEQ 5RND
TRACE LN SUNDRAW /óLN LOOP
ERROR 5IF DEF PROC LN SUNDRAW /
CHAR Y?LN BDPOKE E?RNDFAST LN X
UNDRAW ñCOPY COPY LN TRACE  ó
PRINT LN RUN DEF PROC LET
RETURN "CõLN BDPOKE /INPUT
LPRINT VAL GOSUB OFF?RNDLN OFF
DPOKE Y)LN UUNDRAW YñLPRINT ?U
UNDRAW LN IUNDRAW LN SQR UNDRAW
5CALL EDIT LN XUNDRAW 5PRINT !
LN SUNDRAW LN -DPOKE RETURN ,C>
RETURN ;ASN CLS DPOKE RETURN +
ASN CLS DPOKE 5.CHAR LN SUNDRAW
JTAN 5XERROR LN SUNDRAW ?CLS
DPOKE 5ñRNDACS AUTO TAB :"JLN
RUN DEF PROC UTRNDRETURN )S
UNDRAW :(Y/5URND-CHAR ?PRINT !
LN ERR MSGS UNDRAW Y?LN BDPOKE 5
RUN DEF PROC LN SUNDRAW /JLN H
TRACE 5RUN ERROR LN SUNDRAW /8?
NEW 3DEF PROC 5ñRNDACS AUTO C:5S
RND-ACS COPY LEN WUSR ?!?òùUTRND
CHR$ UNPLOT .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 ñWRNDòLN LINE
CALL RETURN 0SúRETURN RNDLN -
DPOKE ó/INPUT RETURN (M÷
END PROC CôRETURN $4òóòúACS
COPY òLN ³CHAR A ?DDGOSUB
UNDRAW ?RNDùCHAR U÷END PROC
RETURN $C!RETURN (4òJTAN ?TAN
TAN RND9ñWRNDJMöEND PROC úY
ACS ?4KACS LIST ACS RNDFAST
END PROC OASN CONT ERR MSGS
LPRINT ?FFAST LN SCROLL CHAR
LPRINT óACS ?CNEXT J?6ùEND PROC
UöEND PROC LN DPEEK CHAR RETURN
ñ4"Y5LN UUNDRAW 5SAVE CHAR LN S
UNDRAW UöEND PROC 5õEND PROC
ERROR ôS**?TAN EùEND PROC )M 
GOSUB DELETE GOSUB OFF?RNDGOSUB
DELETE SQR INT ³FAST LN
NOSTALGIC DPOKE ?NLPRINT ""
GOSUB OFFñEND PROC LN OFFDPOKE )
  LN OFFDPOKE E?RNDGOSUB OFFñ
END PROC ;6ñEND PROC ñ  ?COS :
LN -DPOKE LN SCHAR RETURN ñASN
RESEQ RETURN  4úLN 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 "
LN LOOP ERROR /END WHEN
RETURN INKEY$4!5RNDTRACE 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 )CùLPRINT X""LN -
DPOKE ?5 LN -DPOKE /FOR ?ññ /ù
LN POKE DEF PROC ñ  GCOS £)ù
END PROC >TAN B.GOSUB DELETE
ERR MSGS EDIT LIST INT ºSTR$ LN
NOSTALGIC DPOKE FOR SGN ;FOR
TAN EñEND PROC 6õEND PROC TAN ?L
COS EõEND PROC FOR GOSUB KGOSUB
DO õEND PROC TAN FAST
END PROC GOSUB OFFñEND PROC B
GOSUB DELETE FAST AT LPRINT LN
NOSTALGIC DPOKE VAL FAST LN ?
DEF PROC LPRINT AT ?7?TAN FOR ö!
?RETURN  CñACS  DRAW ?FOR 5  
ACS T3Kñ;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 +Cô
RETURN -47AT LINE ?RETURN  4ô
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 ñ?DRAW VAL FAST TAN
NOSTALGIC PUSH TAN RETURN CODE 4
G5õEND PROC YELN UUNDRAW YFAST
LN BDPOKE ICOPY LN 5 YSGN LN B
DPOKE 5>DRAW /USR EõEND PROC
GOSUB DO õEND PROC JGOSUB
DELETE LINE ?COS ,?TAN RETURN
RND4õ5ARND/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 /
º77LN NOSTALGIC DPOKE FOR TAN
RETURN SGN 4+LN ERR MSGS UNDRAW
5LIST DRAW ?SUNDRAW ?PCOS ACS ?5
ñ TAB ?UNDRAW TAN RETURN SQR
TAB CONT ERR MSGS LN ERR MSGS
UNDRAW 5úUNDRAW ?SUNDRAW JXACS ?
INT ¹?ELSE A )RND ö!GOSUB
DELETE Kñ;ZACS GOSUB
CLR STACK ·GOSUB 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 >=µUNDRAW
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 UõEND PROC
DEF PROC £E?RND6?RNDöôLN BDPOKE
(CLS $4PLOT LPRINT GOSUB UNDRAW
?RNDTAN 5Eú/ó5"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 /!YE5ORNDLN 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$ 0ö DEF PROC ù/ TO
FAST E-RND)õ ;6-RNDLPRINT TAN
LN -DPOKE LN SCHAR RETURN ñC1
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 ñEND PROC
VAL FAST LN òEDIT 6ñEND PROC
FAST LN PAUSE PROTECT RETURN
10249 KPRINT LN $EDIT /LIST SGN
GOSUB DELETE FAST AT LPRINT LN ³
TRACE AT GOSUB CALL ñEND PROC
FAST LN òEDIT ñ3 LN ?DEF PROC
LPRINT TAN FAST LN LET DEF PROC
LPRINT RETURN ?""J?FY
48672 £RNDñSAVE òùYL?TAN ?7Y
48672 /PAUSE LN òEDIT FAST FAST
LN PAUSE PROTECT RETURN
10257 C!RETURN 0SLET RETURN AK
GOSUB LN $EDIT /CONT 5  SGN ,
RETURN -C(RETURN LC?CHR$ 0DFAST
DDAT ùö DEF PROC ù</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 ?PCòRTAN ?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 4ú5?EDIT
LN SUNDRAW YABS /CHAR RETURN
AND 4õ5·EDIT /LIST PRINT YB5
GOSUB DELETE LN UUNDRAW LET
RETURN =4ôYTAB /GRETURN <>4ôY
ASN /8RETURN >C+RETURN <4÷YASN
LN 5AUTO /<RETURN >=4ú5CóLN X
UNDRAW YPAUSE RETURN <=TAB
CONT ERR MSGS YIF LN 5AUTO LN -
DPOKE RETURN AND ASN ,EDIT TAN
LN BDPOKE EúRND7LN BREAK DPOKE
FOR LN NOSTALGIC DPOKE FOR ?X
UNDRAW LN XAUTO 6õEND PROC 6÷
END PROC TAN EõEND 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 =4ôY
TAB /ARETURN <>4ôYASN /2RETURN >
4÷YASN LN 5AUTO /!RETURN <C<
RETURN >=4ôY AND RETURN <=TAB
CONT ERR MSGS 5CóLN XUNDRAW Y
ABS ?+AUTO E÷END PROC GOSUB
UNDRAW ñEND PROC úWOY""RETURN  
COS 7ó/POKE 5RAUTO ?SUNDRAW LN
SCROLL ò5VRNDACS QTAN 5LEN AUTO
?SUNDRAW 5VRNDACS PLOT ?÷ò5ò LN
**ù""FAST LN 2DEF PROC SGN ?
DATA ú5ò LN **ù""LN 2DEF PROC
COS LN 2DEF PROC COS LOOP DATA E
£RND/SCROLL óóóVAL óóóóVAL LN
EXP AUTO 5ó LN **ùAT LN 2ù7Y
28963 7AT ?7?7QREM 7?7?7TAN 77
AUTO 7ERROR ù7U£RND1""U$RND0TAN
LN -DPOKE LN SCHAR Y5LN UUNDRAW
YGOSUB LN BDPOKE YOFF5ñEND PROC
LN UUNDRAW 5OFFDPOKE LN SUNDRAW
LN HTRACE 5UNTIL DEF PROC ?S
UNDRAW 7D7FAST FAST AT
END PROC LN COS :AT LN DUP
DEF PROC GOSUB DO ñEND PROC TAN
EñEND PROC DATA LOOP <Q /óEñ
END PROC ?LCOS GOSUB KTAN FAST
LN ERR MSGS UNDRAW 5GOSUB
UNDRAW LN XUNDRAW LPRINT LN X
UNDRAW 5Dù?XUNDRAW LN DPOKE 5
NOSTALGIC DPOKE LN SUNDRAW 5FOR
SGN ?XUNDRAW EôRND9QCOPY FQCOPY
FQ 6ùEND PROC Y5E?RNDLN UUNDRAW
I:UõEND PROC LINE LN XUNDRAW 5
ATN DEF PROC ?SUNDRAW £JM5RNDöô?
7(UNPLOT $4RUN 54 6?RNDE0RNDñ
HOME  ù6ñEND PROC 6õEND PROC
TAN RND?:RND?)RND?1RND?4RND
FOR ?7RND¶?N(REM
30241 :2LN ATN DEF PROC LN Eú5/
NOSTALGIC :ñLN ATN DEF PROC ?
DRAW END PROC ± GEM QUEST ** FRA
CTURED WORLD ²)EEND PROC ñ4 LN
IF DEF PROC LN .CHAR 5ñ FAST 5= 
SGN 7GOSUB DO 4NOSTALGIC 66
NOSTALGIC ?CLR STACK END PROC  )
PUSH END PROC ññ LN IF DEF PROC
5+ LN RUN ERROR ?·END PROC      
      )?END PROC ñ" LN IF
DEF PROC E4NOSTALGIC 764
NOSTALGIC GOSUB OFF6NOSTALGIC B
GOSUB DELETE IF DPEEK END PROC ?
CODE END PROC ´                 
             ÷)8END PROC ñ4 LN
IF DEF PROC 5ù FAST 5- SGN CALL
EDIT LN PRINT !?NEW END PROC    
      )<>END PROC ñù LN IF
DEF PROC LN .CHAR 5£RND ñFAST 5$
RND)TRACE FAST 5ñ ERR MSGS EDIT
LPRINT SGN ;FAST PUSH NOSTALGIC
SGN ;68NOSTALGIC LN POKE DATA 5 
 6CNOSTALGIC 5  6GNOSTALGIC 5õ 6
KNOSTALGIC 5ú 6ONOSTALGIC 5HOME
 6SNOSTALGIC 5HOME  6WNOSTALGIC
5ñ 6RNDNOSTALGIC 5  6ERR MSGS
NOSTALGIC 5COS  6 NOSTALGIC LN
SGN OFF?RESTORE DONE.)INDENT ñõ 
LN IF DEF PROC LN .CHAR LN IF
LOOP LN ADELETE ?CLR STACK E4
NOSTALGIC 6PROTECT NOSTALGIC E4
NOSTALGIC FAST 5  SGN BGOSUB
DELETE ASN -IF -E4NOSTALGIC
FAST 5- SGN ;6PROTECT NOSTALGIC
E4NOSTALGIC FAST 5+ SGN BGOSUB
DELETE PAUSE NE4NOSTALGIC FAST 5
SGN BFOR GOSUB DELETE 6
PROTECT NOSTALGIC ELOOP
NOSTALGIC 6END PROC NOSTALGIC E
LOOP NOSTALGIC FAST 5  SGN B
GOSUB DELETE ASN CHR$ IF CHR$ E
LOOP NOSTALGIC FAST 54 SGN ;6
END PROC NOSTALGIC ELOOP
NOSTALGIC FAST 53 SGN BGOSUB
DELETE PAUSE NEXT ELOOP
NOSTALGIC FAST 54 SGN BFOR
GOSUB DELETE 6END PROC
NOSTALGIC 5ñ FAST 54 FAST E
PROTECT NOSTALGIC SGN LN )TRACE
FAST EEND PROC NOSTALGIC
ERR MSGS EDIT LPRINT SGN ;FAST
PUSH NOSTALGIC SGN ;6WHEN
NOSTALGIC EWHEN NOSTALGIC GOSUB
UNDRAW NOSTALGIC NOSTALGIC Dù
STR$ LN NOSTALGIC DPOKE FOR SGN
6CURSOR NOSTALGIC TAN E
NOSTALGIC FAST 5  SGN BGOSUB
DELETE PAUSE CALL DELETE E
NOSTALGIC FAST 5ñ SGN BFOR
GOSUB DELETE 6 NOSTALGIC E
NOSTALGIC FAST 5ñ SGN BGOSUB
DELETE ASN ONDELETE IF ONDELETE
ESNOSTALGIC FAST 5ñ SGN BFOR
GOSUB DELETE 6SNOSTALGIC ES
NOSTALGIC FAST 5ñ SGN BGOSUB
DELETE ASN ?DELETE IF ?DELETE ?)
RESEQ EKNOSTALGIC 64NOSTALGIC EO
NOSTALGIC 6LOOP NOSTALGIC EHOME
NOSTALGIC FAST 5W SGN BGOSUB
DELETE TAB 4DELETE EKNOSTALGIC
FAST 5ñ SGN BFOR GOSUB DELETE 64
NOSTALGIC E4NOSTALGIC FAST 5  
SGN BGOSUB DELETE ASN RDELETE
IF RDELETE 5+ 64NOSTALGIC EHOME
NOSTALGIC FAST 5S SGN BGOSUB
DELETE TAB SGN DELETE EK
NOSTALGIC FAST 5ñ SGN ;64
NOSTALGIC E4NOSTALGIC FAST 5+ 
SGN BGOSUB DELETE PAUSE FAST
DELETE 5  64NOSTALGIC EHOME
NOSTALGIC FAST 5A SGN BGOSUB
DELETE TAB òDO EONOSTALGIC FAST
5ñ SGN BFOR GOSUB DELETE 6LOOP
NOSTALGIC ELOOP NOSTALGIC FAST 5
  SGN BGOSUB DELETE ASN ;DO IF ;
DO 53 6LOOP NOSTALGIC EHOME
NOSTALGIC FAST 5D SGN BGOSUB
DELETE TAB NDO EONOSTALGIC FAST
5ñ SGN ;6LOOP NOSTALGIC ELOOP
NOSTALGIC FAST 53 SGN BGOSUB
DELETE PAUSE CHAR DO 5  6LOOP
NOSTALGIC LN ?ECURSOR NOSTALGIC
FAST 5ñ SGN BGOSUB DELETE TAB
OFFDO ?STOP LOOP ECURSOR
NOSTALGIC FAST 5õ SGN BGOSUB
DELETE TAB ELSE DO ?STOP LOOP E4
NOSTALGIC 6KNOSTALGIC ELOOP
NOSTALGIC 6ONOSTALGIC EHOME
NOSTALGIC FAST 5W SGN BGOSUB
DELETE TAB ,DO ?:DO NORTH)¹DO ñõ
 LN IF DEF PROC LN .CHAR EHOME
NOSTALGIC FAST 5W SGN BGOSUB
DELETE TAB DDO TAN EHOME
NOSTALGIC FAST 5S SGN BGOSUB
DELETE TAB ACS DO ?ZDO SOUTH)U
DO ñõ LN IF DEF PROC LN .CHAR E
HOME NOSTALGIC FAST 5S SGN B
GOSUB DELETE TAB AND DO TAN E
HOME NOSTALGIC FAST 5A SGN B
GOSUB DELETE TAB CLS DO ?LOAD
DO WEST)FOR DO ñô LN IF
DEF PROC LN .CHAR EHOME
NOSTALGIC FAST 5A SGN BGOSUB
DELETE TAB úLOOP TAN EHOME
NOSTALGIC FAST 5D SGN BGOSUB
DELETE TAB FLOOP ?3LOOP EAST).
LOOP ñô LN IF DEF PROC LN .CHAR
EHOME NOSTALGIC FAST 5D SGN B
GOSUB DELETE TAB ULOOP TAN E
HOME NOSTALGIC FAST 5H SGN B
GOSUB DELETE TAB RESEQ LOOP ?
AUTO LOOP HIT)UNDRAW LOOP ñó LN
IF DEF PROC LN .CHAR EHOME
NOSTALGIC FAST 5H SGN BGOSUB
DELETE TAB DUP LOOP ?IF WHEN E
HOME NOSTALGIC FAST 5Q SGN B
GOSUB DELETE TAB £LOOP ? LOOP QU
IT)?LOOP ñô LN IF DEF PROC LN .
CHAR EHOME NOSTALGIC FAST 5Q 
SGN BGOSUB DELETE TAB 1LOOP ?ñ
UNTIL EHOME NOSTALGIC FAST 5E 
SGN BGOSUB DELETE TAB ZLOOP ?N
LOOP ENTER)ILOOP ñõ LN IF
DEF PROC LN .CHAR EHOME
NOSTALGIC FAST 5E SGN BGOSUB
DELETE TAB SQR LOOP ?ZUNTIL ?
CHR$ LOOP ZZZ)PEEK LOOP ñó LN
IF DEF PROC LN .CHAR TAN ?GOSUB
LOOP NO MOVE)NEW LOOP ñ÷ LN IF
DEF PROC LN .CHAR TAN 5ò FAST 5-
 SGN CALL EDIT LN PRINT !??EXIT
GOLD:)úEXIT ñõ LN IF DEF PROC EW
NOSTALGIC LN INPUT DEF PROC ?6
EXIT  )5EXIT ññ LN IF DEF PROC 5
ó FAST 5- SGN CALL EDIT LN
PRINT !?RNDEXIT HLTH:)VEXIT ñõ 
LN IF DEF PROC ESNOSTALGIC LN
INPUT DEF PROC ?DO EXIT  )
DELETE EXIT ññ LN IF DEF PROC 5ô
 FAST 5- SGN CALL EDIT LN PRINT
!??EXIT FOOD:)ELSE EXIT ñõ LN
IF DEF PROC E NOSTALGIC LN
INPUT DEF PROC ?´EXIT  )³EXIT ññ
 LN IF DEF PROC 5ö FAST 5- SGN
CALL EDIT LN PRINT !?8EXIT WORLD
: )1EXIT ñ÷ LN IF DEF PROC ERND
NOSTALGIC LN INPUT DEF PROC 5÷ 
FAST 5- SGN CALL EDIT LN PRINT !
?ASN EXIT GEMS:  )?EXIT ñ÷ LN
IF DEF PROC EERR MSGS NOSTALGIC
LN INPUT DEF PROC LN .CHAR LN
DPOKE DATA ?STOP EXIT >)LLIST
EXIT ññ LN IF DEF PROC LN J
RESEQ EHOME NOSTALGIC FAST 5  
SGN BGOSUB DELETE PAUSE RETURN
EXIT TAN ?GOTO EXIT LN DPOKE
DATA ?£UNTIL START)÷UNTIL ñõ LN
IF DEF PROC LN .CHAR LN DPOKE
DATA ?BUNTIL OVER? Y/N)2UNTIL ñù
 LN IF DEF PROC LN .CHAR LN IF
LOOP EHOME NOSTALGIC FAST 5N 
SGN BGOSUB DELETE TAB DELETE
UNTIL ?TRACE UNTIL NO)CHAR
UNTIL ñò LN IF DEF PROC EHOME
NOSTALGIC FAST 5Y SGN BGOSUB
DELETE TAB ?UNTIL ?DPEEK UNTIL Y
ES)ONUNTIL ñó LN IF DEF PROC E
HOME NOSTALGIC FAST 5N SGN B
GOSUB DELETE TAB ¶UNTIL 5>=£LN
PUSH DRAW 64NOSTALGIC EHOME
NOSTALGIC FAST 5Y SGN BGOSUB
DELETE ASN *UNTIL ?NUNTIL LN
DPOKE DATA ?8UNTIL OKAY...)1
UNTIL ñ÷ LN IF DEF PROC LN .
CHAR LN DPOKE DATA LN DPOKE
DATA LN DPOKE DATA LN DPOKE
DATA ?,LN DPOKE DATA ECURSOR
NOSTALGIC FAST 5ö SGN BGOSUB
DELETE TAB PEEK UNTIL ?4WHILE E
CURSOR NOSTALGIC FAST 5÷ SGN B
GOSUB DELETE TAB RUN UNTIL ?FOR
UNTIL DUNGEON)SLOW UNTIL ñ÷ LN
IF DEF PROC LN .CHAR ECURSOR
NOSTALGIC FAST 5ö SGN BGOSUB
DELETE ASN 3WHILE IF 3WHILE ?<
WHILE NOT HERE)"WHILE ñ! LN IF
DEF PROC LN .CHAR TAN ?BWHILE CI
TY)7WHILE ñô LN IF DEF PROC LN .
CHAR LN DPOKE DATA ?RNDWHILE FOO
D OR)TWHILE ñ÷ LN IF DEF PROC
LN .CHAR LN DPOKE DATA ?INDENT
WHILE HEALTH?)DELETE WHILE ñ÷ 
LN IF DEF PROC LN .CHAR LN IF
LOOP 5  6POP NOSTALGIC EHOME
NOSTALGIC FAST 5F SGN BGOSUB
DELETE TAB ²WHILE 5ñ 6POP
NOSTALGIC EHOME NOSTALGIC FAST 5
SGN BGOSUB DELETE TAB 7WHILE ?
*WHILE FOOD)<WHILE ñô LN IF
DEF PROC LN .CHAR EHOME
NOSTALGIC FAST 5H SGN BGOSUB
DELETE TAB RWHILE 5ò 6POP
NOSTALGIC EHOME NOSTALGIC FAST 5
SGN BGOSUB DELETE TAB AND
WHILE ?EXP WHILE HEALTH)COS
WHILE ñö LN IF DEF PROC LN .
CHAR EPOP NOSTALGIC FAST 5  SGN
BGOSUB DELETE TAB FOR WHILE ?<>
INDENT LN DPOKE DATA ?IF WHILE H
OW MANY?)LET WHILE ñù LN IF
DEF PROC LN .CHAR LN DPOKE DATA
?<WHEN 1-9 X10)£WHEN ñ÷ LN IF
DEF PROC LN .CHAR LN IF LOOP E
HOME NOSTALGIC FAST 50 SGN BFOR
GOSUB DELETE FAST 5ú SGN LN )
TRACE 6HOME NOSTALGIC EHOME
NOSTALGIC FAST 5ú SGN BGOSUB
DELETE ASN EDIT WHEN IF EDIT
WHEN ?<>INDENT EHOME NOSTALGIC
FAST 5RESEQ  SGN BGOSUB DELETE
PAUSE RESTORE WHEN ?<>INDENT E
HOME NOSTALGIC LN INPUT
DEF PROC LN .CHAR LN DPOKE DATA
EWNOSTALGIC FAST EHOME
NOSTALGIC SGN BFOR GOSUB DELETE
FAST 5  SGN BGOSUB DELETE ASN ·
WHEN IF ·WHEN ?ASN WHEN EW
NOSTALGIC FAST EHOME NOSTALGIC
SGN BFOR GOSUB DELETE 6W
NOSTALGIC EPOP NOSTALGIC FAST
 SGN BGOSUB DELETE TAB KWHEN E
NOSTALGIC FAST EHOME NOSTALGIC
SGN ;6 NOSTALGIC EPOP NOSTALGIC
FAST 5ò SGN BGOSUB DELETE TAB
ASN WHEN ESNOSTALGIC FAST EHOME
NOSTALGIC SGN ;6SNOSTALGIC ?
CHR$ WHEN PURCHASED)LN WHEN ñù 
LN IF DEF PROC LN .CHAR TAN ?
GOSUB WHEN NO GOLD)NEW WHEN ñ÷ 
LN IF DEF PROC LN .CHAR TAN LN
DPOKE DATA ?ôINDENT DIR?) 
INDENT ñô LN IF DEF PROC LN .
CHAR LN IF LOOP EHOME NOSTALGIC
FAST 5W SGN BGOSUB DELETE TAB P
INDENT ?DINDENT NORTH)8INDENT ñõ
 LN IF DEF PROC LN .CHAR EHOME
NOSTALGIC FAST 5S SGN BGOSUB
DELETE TAB WHILE INDENT ?UNDRAW
INDENT SOUTH)ERROR INDENT ñõ LN
IF DEF PROC LN .CHAR EHOME
NOSTALGIC FAST 5A SGN BGOSUB
DELETE TAB ?INDENT ?ELSE INDENT
WEST)POP INDENT ñô LN IF
DEF PROC LN .CHAR EHOME
NOSTALGIC FAST 5D SGN BGOSUB
DELETE TAB ;INDENT ?$INDENT EAST
)¹INDENT ñô LN IF DEF PROC LN .
CHAR EHOME NOSTALGIC FAST 5W 
SGN BGOSUB DELETE TAB EINDENT ?
NEXT INDENT EHOME NOSTALGIC
FAST 5S SGN BGOSUB DELETE TAB V
INDENT ?NEXT INDENT EHOME
NOSTALGIC FAST 5A SGN BGOSUB
DELETE TAB ATN INDENT ?NEXT
INDENT EHOME NOSTALGIC FAST 5D 
SGN BGOSUB DELETE TAB <>INDENT ?
NEXT INDENT ?NEW INDENT CANCEL)
STEP INDENT ñö LN IF DEF PROC
LN .CHAR TAN LN DPOKE DATA ?ñ
RESEQ NOT HERE)RAND INDENT ñ! 
LN IF DEF PROC LN .CHAR TAN LN
DPOKE DATA ?1RESEQ YOU DIED*)=
RESEQ ñù LN IF DEF PROC LN .
CHAR LN DPOKE DATA ?ñUNTIL 5  6
HOME NOSTALGIC 5ñ 6ELSE
NOSTALGIC EKNOSTALGIC FAST 5ò 
SGN BFOR GOSUB DELETE FAST EK
NOSTALGIC FAST 5ò SGN ;SGN 7
GOSUB DO 4NOSTALGIC 66NOSTALGIC
5ñ 6?NOSTALGIC EONOSTALGIC FAST
5ò SGN BFOR GOSUB DELETE FAST EO
NOSTALGIC FAST 5ò SGN ;SGN 7
GOSUB DO LOOP NOSTALGIC 6UNTIL
NOSTALGIC LN ?ECURSOR NOSTALGIC
FAST 5ñ SGN BGOSUB DELETE TAB 0
RESEQ 5ó FAST ECNOSTALGIC SGN ;6
?NOSTALGIC ECURSOR NOSTALGIC
FAST 5ò SGN BGOSUB DELETE TAB K
RESEQ 5" 6?NOSTALGIC ECURSOR
NOSTALGIC FAST 5ó SGN BGOSUB
DELETE TAB CODE RESEQ 5£ 6?
NOSTALGIC ECURSOR NOSTALGIC
FAST 5ô SGN BGOSUB DELETE TAB **
RESEQ 5$ 6?NOSTALGIC ECURSOR
NOSTALGIC FAST 5õ SGN BGOSUB
DELETE TAB GOTO RESEQ 5: 6?
NOSTALGIC ECURSOR NOSTALGIC
FAST 5ö SGN BGOSUB DELETE TAB ö
OFF5? FAST EGNOSTALGIC SGN ;6?
NOSTALGIC ECURSOR NOSTALGIC
FAST 5÷ SGN BGOSUB DELETE TAB ,
OFF5) 6?NOSTALGIC E4NOSTALGIC
FAST EKNOSTALGIC SGN BGOSUB
DELETE TAB PIOFFELOOP NOSTALGIC
FAST EONOSTALGIC SGN BGOSUB
DELETE TAB PIOFF5ñ FAST EG
NOSTALGIC SGN ;6?NOSTALGIC LN S
CURSOR E?NOSTALGIC FAST 5ñ SGN ;
6?NOSTALGIC ELOOP NOSTALGIC 76
LOOP NOSTALGIC GOSUB OFFUNTIL
NOSTALGIC BGOSUB DELETE IF ?
RESEQ EELSE NOSTALGIC FAST 5ñ 
SGN ;6ELSE NOSTALGIC E4
NOSTALGIC 764NOSTALGIC GOSUB OFF
6NOSTALGIC BGOSUB DELETE IF
RESEQ RESEQ EGNOSTALGIC FAST 5ñ 
SGN ;6GNOSTALGIC EGNOSTALGIC
FAST 5ñ SGN BGOSUB DELETE PAUSE
3OFF5  6GNOSTALGIC ECNOSTALGIC
FAST 5ñ SGN ;6CNOSTALGIC EC
NOSTALGIC FAST 5÷ SGN BGOSUB
DELETE PAUSE ZOFF5  6CNOSTALGIC
EõEND PROC FAST LN RNDTRACE LN
LINE TRACE SGN LN >DRAW 6HOME
NOSTALGIC TAN 5?RND6?NOSTALGIC E
?NOSTALGIC FAST 5ñ SGN ;6?
NOSTALGIC E?NOSTALGIC REM  SGN B
GOSUB DELETE TAB CCURSOR E?
NOSTALGIC FAST 5ñ SGN ;** SGN B
GOSUB DELETE TAB CCURSOR E?
NOSTALGIC FAST 5ò SGN ;£ SGN B
GOSUB DELETE TAB CCURSOR ?F
CURSOR ?NOT OFFE?NOSTALGIC FAST
5ó SGN ;6?NOSTALGIC TAN E8
NOSTALGIC FAST 55 FAST EELSE
NOSTALGIC FAST 5ñ SGN BFOR
GOSUB DELETE SGN LN )TRACE FAST
5ô SGN LN )TRACE FAST 55 
ERR MSGS EDIT LPRINT SGN ;FAST
PUSH NOSTALGIC FAST 5ô ERR MSGS
EDIT LPRINT SGN ;FAST PUSH
NOSTALGIC FAST E?NOSTALGIC FAST
5ñ SGN BFOR GOSUB DELETE SGN LN
)TRACE FAST 5ñ ERR MSGS EDIT
LPRINT SGN ;FAST PUSH NOSTALGIC
SGN ;6END PROC NOSTALGIC E?
NOSTALGIC FAST E?NOSTALGIC FAST
5ñ SGN BFOR GOSUB DELETE FAST 5-
 SGN LN )TRACE SGN ;6?NOSTALGIC
5ñ FAST 5ô SGN 7GOSUB DO  
NOSTALGIC 6²NOSTALGIC EEND PROC
NOSTALGIC FAST E?NOSTALGIC ?E
END PROC NOSTALGIC FAST 5ñ SGN ;
FAST E?NOSTALGIC FAST 5ñ SGN ;?E
END PROC NOSTALGIC FAST 5ò SGN ;
FAST E?NOSTALGIC FAST 5ò SGN ;?E
END PROC NOSTALGIC FAST 5ó SGN ;
FAST E?NOSTALGIC FAST 5ó SGN ;?E
END PROC NOSTALGIC FAST 55 SGN ;
6END PROC NOSTALGIC E?NOSTALGIC
FAST 5ô SGN ;6?NOSTALGIC E 
NOSTALGIC 76 NOSTALGIC GOSUB OFF
²NOSTALGIC BGOSUB DELETE IF Z
CURSOR TAN 5" FAST 5= SGN 7
GOSUB DO  NOSTALGIC 6²NOSTALGIC
E8NOSTALGIC FAST 55 FAST E 
NOSTALGIC SGN LN )TRACE SGN ;6
END PROC NOSTALGIC 5- FAST 52 
SGN 7GOSUB DO ´NOSTALGIC 6¶
NOSTALGIC EEND PROC NOSTALGIC
FAST E´NOSTALGIC FAST 55 
ERR MSGS EDIT LPRINT SGN ;FAST
PUSH NOSTALGIC SGN BFOR GOSUB
DELETE FAST EEND PROC NOSTALGIC
FAST E´NOSTALGIC SGN ;?E´
NOSTALGIC 76´NOSTALGIC GOSUB OFF
¶NOSTALGIC BGOSUB DELETE IF ?
DATA E NOSTALGIC 76 NOSTALGIC
GOSUB OFF²NOSTALGIC BGOSUB
DELETE IF EXIT DATA 5= FAST 5- 
SGN CALL EDIT LN PRINT !?<>DATA
         )USR DATA ñù LN IF
DEF PROC 5= FAST 5- SGN CALL
EDIT LN PRINT !TAN 5< FAST 5- 
SGN CALL EDIT LN PRINT !?£
RESTORE BUILDING)ôRESTORE ñ! LN
IF DEF PROC 5= FAST 5- SGN CALL
EDIT LN PRINT !?ARESTORE >)9
RESTORE ññ LN IF DEF PROC 5
NOSTALGIC NOSTALGIC GOSUB OFFñ
END PROC LN OFFDPOKE 5""òLN
UNTIL DEF PROC 5  FAST 5+ SGN 7
GOSUB DO KNOSTALGIC 6MNOSTALGIC
5  FAST 53 SGN 7GOSUB DO O
NOSTALGIC 6QNOSTALGIC EK
NOSTALGIC FAST 54 SGN LN )TRACE
FAST EONOSTALGIC FAST 5ñ 
ERR MSGS EDIT LPRINT SGN ;FAST
PUSH NOSTALGIC SGN ;64NOSTALGIC
5ñ 6?NOSTALGIC EKNOSTALGIC FAST
5  SGN BGOSUB DELETE TAB -
RESTORE ?VAL READ EONOSTALGIC
FAST 5  SGN BGOSUB DELETE TAB B
RESTORE ?VAL READ E4NOSTALGIC
FAST 54 SGN BFOR GOSUB DELETE
GOSUB UNDRAW NOSTALGIC
NOSTALGIC DùSTR$ LN NOSTALGIC
DPOKE FOR SGN 6¸NOSTALGIC E4
NOSTALGIC FAST 5ñ SGN BFOR
GOSUB DELETE GOSUB UNDRAW
NOSTALGIC NOSTALGIC DùSTR$ LN
NOSTALGIC DPOKE FOR SGN 6POP
NOSTALGIC EPOP NOSTALGIC FAST
 SGN BGOSUB DELETE PAUSE öREAD E
4NOSTALGIC FAST 5ò SGN BFOR
GOSUB DELETE GOSUB UNDRAW
NOSTALGIC NOSTALGIC DùSTR$ LN
NOSTALGIC DPOKE FOR SGN 6POP
NOSTALGIC E¸NOSTALGIC FAST 5õ 
SGN BGOSUB DELETE PAUSE ,READ E
POP NOSTALGIC 6¸NOSTALGIC 5ARND
LN PUSH DRAW FAST 5 ñSGN LN
CLEAR DEF PROC 6£NOSTALGIC 5ARND
LN PUSH DRAW FAST 5 ñSGN LN
CLEAR DEF PROC 6(NOSTALGIC E(
NOSTALGIC FAST 5M SGN BGOSUB
DELETE PAUSE EDIT READ ?IF READ
E£NOSTALGIC FAST 5? SGN BGOSUB
DELETE PAUSE USER READ 5ô 6?
NOSTALGIC E£NOSTALGIC FAST 5; 
SGN BGOSUB DELETE PAUSE ?READ 5ò
 6?NOSTALGIC E£NOSTALGIC FAST 5R
 SGN BGOSUB DELETE PAUSE ¹READ 5
ó 6?NOSTALGIC E£NOSTALGIC FAST 5
UNDRAW  SGN BGOSUB DELETE PAUSE
1READ 5õ 6?NOSTALGIC E£
NOSTALGIC FAST 5READ  SGN B
GOSUB DELETE PAUSE LREAD 5ö 6?
NOSTALGIC E£NOSTALGIC FAST 5
USER  SGN BGOSUB DELETE PAUSE
VAL READ 5÷ 6?NOSTALGIC E4
NOSTALGIC GOSUB UNDRAW
NOSTALGIC NOSTALGIC DùFAST E?
NOSTALGIC SGN FOR LN OFFDPOKE EO
NOSTALGIC 76ONOSTALGIC GOSUB OFF
QNOSTALGIC BGOSUB DELETE IF
READ RESTORE EKNOSTALGIC 76K
NOSTALGIC GOSUB OFFMNOSTALGIC B
GOSUB DELETE IF DEF PROC
RESTORE TAN E¸NOSTALGIC 6?
NOSTALGIC E(NOSTALGIC FAST 5
UNDRAW  SGN BGOSUB DELETE PAUSE
=NOSTALGIC EPOP NOSTALGIC 6?
NOSTALGIC ?VAL READ TAN         
* * ??          = - ó 4 HOME    
END PROC    ñ       ELSE        
X?  ö ö ö   ñ   ò?  N   ñ   ö   
ö   ú   FAST ?  V?  õ õ 3 3 ñ   
L   ò   PRINT  óWHEN  REM       
MCODER II         COPYRIGHT 1983
   D C THRELFALL COMPILER AT 173
00 PROG AT 20500
  10 REM **TILES**
  20 CLS
  30 CLEAR
  40 PRINT  GEM QUEST ** FRACT
URED WORLD ²"
  50 FOR L=1 TO 20
  60 PRINT " ";TAB 21;"         
  ";
  70 NEXT L
  80 PRINT                    
           ÷";AT 9,22;"         
"
  81 LET PP=PEEK 16396+256*PEEK
16397+1
  82 GOSUB 9000
  85 LET Q=0
  90 LET Z=0
 100 LET X=5
 110 LET Y=10
 120 LET HP=100
 121 LET GL=100
 122 LET WL=1
 123 LET GM=0
 130 LET FD=100
 145 GOSUB 3000
 146 PRINT "DONE."
 150 GOSUB 1100
 155 REM M?
 160 GOSUB 1000
 200 GOTO 150
 500 LET LL=L
 510 IF L<0 THEN LET LL=L+22
 520 IF L>21 THEN LET LL=L-22
 530 LET MM=M
 540 IF M<0 THEN LET MM=M+32
 550 IF M>31 THEN LET MM=M-32
 560 LET LOC=1+32*LL+MM
 570 LET T1=W(LOC)
 580 RETURN
1000 IF FD>0 THEN LET FD=FD-1
1002 IF FD<1 THEN LET HP=HP-1
1003 IF HP<1 THEN GOTO 1810
1005 LET L=X
1006 LET M=Y
1007 IF I=60 THEN LET L=X-1
1008 IF L<0 THEN LET L=21
1010 IF I=56 THEN LET L=X+1
1015 IF L>21 THEN LET L=0
1020 IF I=38 THEN LET M=Y-1
1025 IF M<0 THEN LET M=31
1030 IF I=41 THEN LET M=Y+1
1032 IF M>31 THEN LET M=0
1035 GOSUB 500
1040 IF T1=1 THEN GOTO 1095
1041 IF T1=5 THEN GOTO 1095
1050 LET X=L
1051 LET Y=M
1060 IF I=60 THEN PRINT "NORTH"
1061 IF I=60 THEN RETURN
1062 IF I=56 THEN PRINT "SOUTH"
1063 IF I=56 THEN RETURN
1064 IF I=38 THEN PRINT "WEST"
1065 IF I=38 THEN RETURN
1066 IF I=41 THEN PRINT "EAST"
1067 IF I=41 THEN RETURN
1068 IF I=45 THEN PRINT "HIT"
1069 IF I=45 THEN GOTO 1500
1078 IF I=54 THEN PRINT "QUIT"
1079 IF I=54 THEN GOTO 1200
1080 IF I=42 THEN PRINT "ENTER"
1081 IF I=42 THEN GOTO 1400
1089 PRINT "ZZZ"
1090 RETURN
1095 PRINT "NO MOVE"
1096 RETURN
1100 PRINT AT 2,22;"GOLD:";GL;" 
";AT 3,22;"HLTH:";HP;" ";AT 4,22
;"FOOD:";FD;" ";AT 6,22;"WORLD: 
";WL;AT 7,22;"GEMS:  ";GM
1105 GOSUB 6000
1110 PRINT ">";
1120 GOSUB 2000
1130 IF I>0 THEN RETURN
1140 GOTO 1120
1200 GOSUB 6000
1210 PRINT "START"
1220 GOSUB 6000
1230 PRINT "OVER? Y/N"
1250 GOSUB 1100
1260 IF I=51 THEN PRINT "NO";
1270 IF I=62 THEN PRINT "YES";
1280 IF I=51 THEN LET L=USR 3292
1290 IF I<>62 THEN GOTO 1250
1300 GOSUB 6000
1310 PRINT "OKAY..."
1320 GOSUB 6000
1330 GOSUB 6000
1340 GOSUB 6000
1350 GOSUB 6000
1360 GOTO 82
1400 GOSUB 6000
1420 IF T1=6 THEN GOTO 1460
1430 IF T1=7 THEN PRINT "DUNGEON
"
1440 IF T1<6 THEN PRINT "NOT HER
E"
1450 RETURN
1460 PRINT "CITY"
1461 GOSUB 6000
1462 PRINT "FOOD OR"
1463 GOSUB 6000
1465 PRINT "HEALTH?"
1466 GOSUB 1100
1467 LET E=0
1468 IF I=43 THEN LET E=1
1469 IF I=43 THEN PRINT "FOOD"
1470 IF I=45 THEN LET E=2
1471 IF I=45 THEN PRINT "HEALTH"
1472 IF E=0 THEN GOTO 1650
1473 GOSUB 6000
1474 PRINT "HOW MANY?"
1475 GOSUB 6000
1476 PRINT "1-9 X10"
1477 GOSUB 1100
1478 LET I=(I-28)*10
1479 IF I<10 THEN GOTO 1650
1480 IF I>90 THEN GOTO 1650
1481 PRINT I
1482 GOSUB 6000
1484 IF GL-I<0 THEN GOTO 1489
1485 LET GL=GL-I
1486 IF E=1 THEN LET FD=FD+I
1487 IF E=2 THEN LET HP=HP+I
1496 PRINT "PURCHASED"
1497 RETURN
1498 PRINT "NO GOLD"
1499 RETURN
1500 GOSUB 6000
1510 PRINT "DIR?"
1520 GOSUB 1100
1550 IF I=60 THEN PRINT "NORTH"
1560 IF I=56 THEN PRINT "SOUTH"
1570 IF I=38 THEN PRINT "WEST"
1580 IF I=41 THEN PRINT "EAST"
1590 IF I=60 THEN GOTO 1700
1600 IF I=56 THEN GOTO 1700
1610 IF I=38 THEN GOTO 1700
1620 IF I=41 THEN GOTO 1700
1650 PRINT "CANCEL"
1660 RETURN
1700 GOSUB 6000
1710 PRINT "NOT HERE"
1720 RETURN
1800 GOSUB 6000
1810 PRINT "YOU DIED*"
1820 GOSUB 6000
1830 GOTO 1200
2000 LET I=0
2002 LET X1=1
2005 FOR L=X-2 TO X+2
2010 LET Y1=1
2020 FOR M=Y-2 TO Y+2
2090 GOSUB 500
2120 IF T1=1 THEN LET O=3+Q
2130 IF T1=2 THEN LET O=11
2131 IF T1=3 THEN LET O=12
2132 IF T1=4 THEN LET O=13
2133 IF T1=5 THEN LET O=14
2134 IF T1=6 THEN LET O=15+Z
2135 IF T1=7 THEN LET O=17
2137 IF L=X AND M=Y THEN LET O=1
+Z
2140 GOSUB 5000
2150 LET Y1=Y1+1
2160 NEXT M
2170 LET X1=X1+1
2180 NEXT L
2190 LET Z=Z+1
2200 IF Z>1 THEN LET Z=0
2210 LET Q=Q+1
2220 IF Q>7 THEN LET Q=0
2230 LET I=CODE INKEY$
2240 RETURN
2900 REM **CREATE TILES**
3000 LET T=16509
3010 LET T=T+1
3020 IF PEEK T=234 AND PEEK (T+1
)=216 AND PEEK (T+2)=12 THEN
GOTO 3040
3030 GOTO 3010
3040 LET T=T+3
3050 RETURN
5000 LET MM=PP+33*(X1-1)*4+33+4*
(Y1-1)+1
5010 LET NN=T+(O-1)*22
5020 FOR C=1 TO 4
5030 POKE MM,PEEK NN
5040 POKE MM+1,PEEK (NN+1)
5050 POKE MM+2,PEEK (NN+2)
5060 POKE MM+3,PEEK (NN+3)
5070 LET MM=MM+33
5080 LET NN=NN+4
5090 NEXT C
5100 RETURN
6000 FOR C=11 TO 20
6020 LET MM=PP+33*C
6030 FOR D=22 TO 30
6040 POKE MM+D-33,PEEK (MM+D)
6050 NEXT D
6060 NEXT C
6080 PRINT AT 20,22;"         ";
AT 20,22;
6090 RETURN
9000 PRINT AT 19,22;"BUILDING";
AT 20,22;">";
9010 DIM W(704)
9020 FOR X=0 TO 21
9030 FOR Y=0 TO 31
9040 LET L=X*32+Y+1
9050 LET T=1
9060 IF X=0 THEN GOTO 9200
9070 IF Y=0 THEN GOTO 9200
9080 LET N=W(L-32)
9090 LET E=W(L-1)
9100 IF E>5 THEN LET E=W(L-2)
9110 IF N>5 THEN LET N=E
9120 LET R=USR 16550/328
9125 LET S=USR 16550/328
9130 IF S>50 THEN GOTO 9270
9140 IF R>15 THEN LET T=4
9150 IF R>25 THEN LET T=2
9160 IF R>55 THEN LET T=3
9170 IF R>75 THEN LET T=5
9180 IF R>95 THEN LET T=6
9190 IF R>97 THEN LET T=7
9200 LET W(L)=T
9220 NEXT Y
9240 NEXT X
9260 RETURN
9270 LET T=N
9280 IF S>75 THEN LET T=E
9290 GOTO 9200
9299 STOP
9310 REM **£µ¶· µ²±ôµ¶ò ò ñ 
9320 REM µ¶µ µ²´ñµ¶  ò ñ 
9330 REM ·ô  ñò¶ö  ·ô¶öñò
9340 REM ³    ó³ó  ³ ³ó ó
9350 REM ô  ·ò¶öñ ·ô öñò¶
9360 REM    ³ó³ó  ³  ó ó³
9370 REM   ·ô¶öñò·ô  ñò¶ö
9380 REM   ³ ³ó ó³    ó³ó
9390 REM  ·ô öñò¶ô  ·ò¶öñ
9400 REM  ³  ó ó³   ³ó³ó 
9410 REM ··   ñôôôôò ò   
9420 REM  ±  · õ ±    ¹  
9430 REM úùúùùúùúúùúùùúùú
9440 REM  öôôö öò ö ôöòöò
9450 REM  µù µ±²õµ::õòñòñ
9460 REM  µú µ±²õµ::õòñòñ
9470 REM ·  ô ùú  ùú  ùú 
9500 SAVE "GQ2016"
9510 RAND USR 20500