Home » Personal collection » Acorn tapes » Commercial_Releases » boxed_acornsoft_tape10b_acorn_introductory_cassette.wav » SOLVER

SOLVER

This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.

Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.

Tape/disk: Home » Personal collection » Acorn tapes » Commercial_Releases » boxed_acornsoft_tape10b_acorn_introductory_cassette.wav
Filename: SOLVER
Read OK:
File size: 247C bytes
Load address: FFFF0E00
Exec address: FFFF8023
Duplicates

There are 2 duplicate copies of this file in the archive:

File contents
   10REM M-TEXTURT
   20REM Model B Version, with mazes.
   30REM Optimised for space.
   40REM Stephen Goudge, October 1982
   50DIM direction%(7,2),dirname$(7),world% 600
   60MODE 4
   70PROCinitialise
   80PROCsetup
   90END
  100 
  110 
  120DEFPROCinitialise
  130LOCAL cns%,cnt%
  140REM Character definitions
  150VDU 23,224,16,56,84,146,146,16,16,16
  160VDU 23,225,16,16,16,146,146,84,56,16
  170VDU 23,226,24,32,64,255,64,32,24,0
  180VDU 23,227,24,4,2,255,2,4,24,0
  190VDU 23,228,252,192,160,144,136,132,2,1
  200VDU 23,229,128,64,33,17,9,5,3,63
  210VDU 23,230,63,3,5,9,17,33,64,128
  220VDU 23,231,1,2,132,136,144,160,192,252
  230VDU 23,232,24,60,126,255,24,24,24,24
  240VDU 23,233,24,24,24,24,255,126,60,24
  250VDU 23,234,16,48,112,255,255,112,48,16
  260VDU 23,235,8,12,14,255,255,14,12,8
  270VDU 23,236,124,248,240,248,204,134,3,1
  280VDU 23,237,128,192,97,51,31,15,31,62
  290VDU 23,238,62,31,15,31,51,97,192,128
  300VDU 23,239,1,3,134,204,248,240,248,124
  310VDU 23,240,255,255,255,255,255,255,255,255
  330xoffset%=0:yoffset%=21
  340maxx%=30:maxy%=20
  350xmax%=33:xmin%=2:ymax%=24:ymin%=3
  360FOR cnt%=0 TO 7
  370READ direction%(cnt%,0),direction%(cnt%,1),direction%(cnt%,2)
  380READ dirname$(cnt%)
  390NEXT cnt%
  400ENDPROC
  410 
  420DATA 23,224,232,"North     "
  430DATA 33,230,238,"North East"
  440DATA 32,227,235,"East      "
  450DATA 31,229,237,"South East"
  460DATA 21,225,233,"South     "
  470DATA 11,231,239,"South West"
  480DATA 12,226,234,"West      "
  490DATA 13,228,236,"North West"
  500 
  510DEFPROCsetup
  520LOCAL cnt%
  530MOVE 40,948
  540DRAW 1104,948:DRAW 1104,200
  550DRAW 40,200:DRAW 40,948
  560MOVE 88,904
  570DRAW 1056,904:DRAW 1056,248
  580DRAW 88,248:DRAW 88,904
  590DRAW 40,948
  600MOVE 1056,904:DRAW 1104,948
  610MOVE 1056,248:DRAW 1104,200
  620MOVE 88,248:DRAW 40,200
  630VDU 5
  640REM Draw in numeric scale.
  650MOVE 96,940
  660FOR cnt%=1 TO 30:PRINT;cnt% MOD 10;:NEXT cnt%
  670MOVE 96,240
  680FOR cnt%=1 TO 30:PRINT;cnt% MOD 10;:NEXT cnt%
  690MOVE 48,280
  700FOR cnt%=1 TO 20
  710PRINT;cnt% MOD 10;CHR$(8);CHR$(11);
  720NEXT cnt%
  730MOVE 1064,280
  740FOR cnt%=1 TO 20
  750PRINT;cnt% MOD 10;CHR$(8);CHR$(11);
  760NEXT
  770VDU 4
  780PRINTTAB(0,26);"Dir:           Pos:        Paint:' '.";
  790PROCCLEARSCREEN
  800ENDPROC
  810 
  820DEFPROCCLEARSCREEN
  830LOCAL cnt%
  840PROCNOERROR
  850dir%=0:xpos%=1:ypos%=1
  860xstart%=-1:ystart%=-1:xfin%=-1:yfin%=-1
  870pen%=2:paint$="*"
  880FOR cnt%=0 TO 600
  890world%?cnt%=32
  900NEXT cnt%
  910xtext%=POS:ytext%=VPOS
  920VDU 28,xmin%+1,ymax%-1,xmax%-1,ymin%+1
  930CLS
  940PROCwritepaint
  950PROCwriteturtle
  960PROCwritedir
  970PROCwritepos
  980CLS
  990ENDPROC
 1000 
 1010DEFPROCtext
 1020VDU 28,0,30,39,27
 1030PRINTTAB(xtext%,ytext%);
 1040ENDPROC
 1050 
 1060DEFPROCdata
 1070xtext%=POS
 1080ytext%=VPOS
 1090VDU 28,0,26,39,26
 1100ENDPROC
 1110 
 1120DEFPROCplay
 1130xtext%=POS
 1140ytext%=VPOS
 1150VDU 28,xmin%,ymax%,xmax%,ymin%
 1160ENDPROC
 1170 
 1180DEFPROCwritedir
 1190PROCdata
 1200PRINTTAB(4,0);dirname$(dir%);
 1210PROCtext
 1220ENDPROC
 1230 
 1240DEFPROCwritepos
 1250PROCdata
 1260PRINTTAB(19,0);"       ";
 1270PRINTTAB(19,0);"(";xpos%;",";ypos%;")";
 1280PROCtext
 1290ENDPROC
 1300 
 1310DEFPROCwriteturtle
 1320PROCplay
 1330PRINTTAB(xoffset%+xpos%,yoffset%-ypos%);CHR$(direction%(dir%,pen%));
 1340PROCtext
 1350ENDPROC
 1360 
 1370DEFPROCwritepaint
 1380PROCdata
 1390PRINTTAB(34,0);paint$;
 1400PROCtext
 1410ENDPROC
 1420 
 1430DEFPROCmove
 1440LOCAL ny%,nx%
 1450nx%=xpos%+INT(direction%(dir%,0)/10)-2
 1460ny%=ypos%+direction%(dir%,0) MOD 10-2
 1470IF(nx%<1)OR(ny%<1)OR(nx%>maxx%)OR(ny%>maxy%) THEN PROCerror(9):ENDPROC
 1480IF pen%=2 THEN world%?((xpos%-1)*20+ypos%)=ASC(paint$)
 1490PROCplay
 1500PRINTTAB(xoffset%+xpos%,yoffset%-ypos%);CHR$(world%?((xpos%-1)*20+ypos%))
 1510xpos%=nx%:ypos%=ny%
 1520PROCtext
 1530PROCwriteturtle
 1540PROCwritepos
 1550ENDPROC
 1560 
 1570DEFPROCJUMPTO(x%,y%)
 1580IF error% THEN ENDPROC
 1590IF(x%<1)OR(y%<1)OR(x%>maxx%)OR(y%>maxy%)THEN PROCerror(10):ENDPROC
 1600PROCplay
 1610PRINTTAB(xoffset%+xpos%,yoffset%-ypos%);CHR$(world%?((xpos%-1)*20+ypos%))
 1620xpos%=x%:ypos%=y%
 1630PROCtext
 1640PROCwriteturtle
 1650PROCwritepos
 1660ENDPROC
 1670 
 1680DEFPROCDRAWTO(x1%,y1%)
 1690LOCAL x,y,dx,dy,xt%,yt%,length%
 1700IF error% THEN ENDPROC
 1710length%=ABS(x1%-xpos%)
 1720IF ABS(y1%-ypos%)>length% THEN length%=ABS(y1%-ypos%)
 1730dx=(x1%-xpos%)/length%:dy=(y1%-ypos%)/length%
 1740x=xpos%+0.5:y=ypos%+0.5
 1750IF length%=0 THEN ENDPROC
 1760REPEAT
 1770length%=length%-1
 1780xt%=INT(x):yt%=INT(y)
 1790IF (xt%>maxx%)OR(xt%<1)OR(yt%>maxy%)OR(yt%<1) THEN PROCerror(1):ENDPROC
 1800IF pen%=2 THEN world%?((xpos%-1)*20+ypos%)=ASC(paint$)
 1810PROCplay
 1820PRINTTAB(xoffset%+xpos%,yoffset%-ypos%);CHR$(world%?((xpos%-1)*20+ypos%));
 1830x=x+dx:y=y+dy
 1840xpos%=xt%:ypos%=yt%
 1850PROCtext:PROCwriteturtle:PROCwritepos
 1860UNTIL error% OR (length%<0)
 1870IF pen%=2 THEN world%?((xpos%-1)*20+ypos%)=ASC(paint$)
 1880ENDPROC
 1890 
 1900DEFPROCFORWARD(num%)
 1910IF error% THEN ENDPROC
 1920IF num%<1 THEN PROCerror(2):ENDPROC
 1930REPEAT
 1940num%=num%-1:PROCmove
 1950UNTIL error% OR (num%<1)
 1960ENDPROC
 1970 
 1980DEFPROCturnleft
 1990IF error% THEN ENDPROC
 2000dir%=(dir%+7) MOD 8
 2010PROCwriteturtle:PROCwritedir
 2020ENDPROC
 2030 
 2040DEFPROCturnright
 2050IF error% THEN ENDPROC
 2060dir%=(dir%+17) MOD 8
 2070PROCwriteturtle:PROCwritedir
 2080ENDPROC
 2090 
 2100DEFPROCLEFT(degrees%)
 2110LOCAL deg%
 2120IF error% THEN ENDPROC
 2130deg%=degrees% DIV 45
 2140IF (degrees%<>deg%*45)OR(degrees%<=0) THEN PROCerror(3):ENDPROC
 2150REPEAT
 2160PROCturnleft
 2170deg%=deg%-1
 2180UNTIL (deg%=0)OR error%
 2190ENDPROC
 2200 
 2210DEFPROCRIGHT(degrees%)
 2220LOCAL deg%
 2230IF error% THEN ENDPROC
 2240deg%=degrees% DIV 45
 2250IF (degrees%<>deg%*45)OR(degrees%<=0) THEN PROCerror(4):ENDPROC
 2260REPEAT
 2270PROCturnright
 2280deg%=deg%-1
 2290UNTIL (deg%=0)OR error%
 2300ENDPROC
 2310 
 2320DEFPROCPENUP
 2330IF error% THEN ENDPROC
 2340pen%=1:PROCwriteturtle
 2350ENDPROC
 2360 
 2370DEFPROCPENDOWN
 2380IF error% THEN ENDPROC
 2390pen%=2:PROCwriteturtle
 2400ENDPROC
 2410 
 2420DEFPROCCHANGEPAINT(newp$)
 2430IF error% THEN ENDPROC
 2440IF LEN(newp$)>1 THEN PROCerror(5):ENDPROC
 2450IF ASC(newp$)<32 THEN PROCerror(6):ENDPROC
 2460paint$=newp$
 2470PROCwritepaint
 2480ENDPROC
 2490 
 2500DEFPROCstart(x%,y%)
 2510PROCJP(x%,y%)
 2520xstart%=x%:ystart%=y%
 2530ENDPROC
 2540 
 2550DEFFNXSTART=xstart%
 2560DEFFNYSTART=ystart%
 2570DEFPROCfin(x%,y%)
 2580world%?((x%-1)*20+y%)=ASC("F")
 2590xfin%=x%:yfin%=y%
 2600PROCplay
 2610PRINTTAB(xoffset%+x%,yoffset%-y%);"F";
 2620PROCtext
 2630PROCCP(".")
 2640ENDPROC
 2650 
 2660DEFFNXFINISH=xfin%
 2670 
 2680DEFFNYFINISH=yfin%
 2690 
 2700DEFPROCGETMAZE(m%)
 2710DEFPROCGM(m%)
 2720LOCAL first%,second%,halt%
 2730PROCCS
 2740PROCCP(CHR$(240))
 2750IF(m%<1) OR (m%>7) THEN PROCerror(11):ENDPROC
 2760IF m%=1 THEN RESTORE 2970
 2770IF m%=2 THEN RESTORE 2980
 2780IF m%=3 THEN RESTORE 2990
 2790IF m%=4 THEN RESTORE 3030
 2800IF m%=5 THEN RESTORE 3060
 2810IF m%=6 THEN RESTORE 3120
 2820IF m%=7 THEN RESTORE 3180
 2830halt%=FALSE
 2840REPEAT
 2850READ first%,second%
 2860IF first%=-10 THEN halt%=TRUE:GOTO 2900
 2870PROCJP(first%,second%)
 2880READ first%,second%
 2890PROCDR(first%,second%)
 2900UNTIL halt%
 2910READ first%
 2920PROCstart(second%,first%)
 2930READ first%,second%
 2940PROCfin(first%,second%)
 2950ENDPROC
 2960 
 2970 DATA 1,8,20,8,-10,4,2,6,14
 2980DATA 8,4,8,20,22,1,22,16,8,4,18,4,12,16,22,16,-10,4,10,26,10
 2990DATA 16,2,26,2,14,4,24,4,2,6,16,6,4,8,14,8,8,10,14,10,10,12,16,12,10,19,24,19
 3000DATA 2,6,2,20,4,8,4,20,8,10,8,20,10,12,10,19,14,1,14,4,14,8,14,10
 3010DATA 16,1,16,2,16,6,16,12,24,4,24,19,26,2,26,20
 3020DATA -10,15,1,3,20
 3030DATA 6,2,18,2,8,4,18,4,8,8,22,8,6,10,20,10,1,14,12,14,1,16,10,16
 3040DATA 12,19,20,19,6,2,6,10,8,4,8,8,10,16,10,20,12,14,12,19
 3050DATA 18,2,18,4,20,10,20,19,22,8,22,20,-10,1,15,17,3
 3060DATA 2,2,12,2,16,2,26,2,2,4,24,4,2,6,16,6,18,6,22,6,4,8,14,8
 3070DATA 8,10,14,10,16,10,22,10,10,12,24,12,12,14,24,14,10,16,22,16
 3080DATA 10,18,24,18,26,18,28,18,10,20,30,20,2,2,2,4,2,6,2,20
 3090DATA 4,8,4,20,8,10,8,20,10,16,10,18,14,1,14,4,14,8,14,10,16,1,16,2
 3100DATA 16,6,16,10,18,6,18,10,20,7,20,8,24,4,24,12,24,14,24,18,26,2,26,18
 3110DATA 28,2,28,18,30,1,30,20,-10,15,1,3,20
 3120DATA 1,20,8,20,2,2,12,2,16,2,26,2,2,4,24,4,2,6,16,6
 3130DATA 18,6,22,6,4,8,14,8,8,10,14,10,16,10,22,10,10,12,24,12,10,16,23,16
 3140DATA 12,14,24,14,2,18,8,18,10,18,24,18,26,18,28,18,12,20,28,20
 3150DATA 2,2,2,4,2,6,2,18,4,8,4,18,8,10,8,18,10,12,10,19,14,1,14,4,14,8
 3160DATA 14,10,16,1,16,2,16,6,16,10,18,6,18,10,24,4,24,12,26,2,26,18,28,2
 3170DATA 28,18,30,1,30,19,-10,15,1,3,17
 3180DATA 10,2,29,2,10,4,24,4,26,6,28,6,12,8,18,8,16,12,18,12,20,12,28,12
 3190DATA 6,14,8,14,16,14,28,14,10,16,22,16,4,19,14,19,16,18,26,18
 3200DATA 2,1,2,10,2,12,2,19,4,1,4,19,8,2,8,10,10,6,10,16,12,8,12,12,18,8
 3210DATA 18,12,24,4,24,10,28,6,28,18,-10,1,1,14,10
 3220 
 3230DEFFNAHEAD
 3240LOCAL x%,y%
 3250x%=xpos%+INT(direction%(dir%,0)/10)-2
 3260y%=ypos%+direction%(dir%,0) MOD 10 -2
 3270IF (x%<1)OR(y%<1)OR(x%>maxx%)OR(y%>maxy%)THEN =CHR$(0) ELSE =CHR$(world%?((x%-1)*20+y%))
 3280 
 3290DEFFNUNDER
 3300=CHR$(world%?((xpos%-1)*20+ypos%))
 3310 
 3320DEFFNFINISHED
 3330=((xpos%=xfin%)AND(ypos%=yfin%))
 3340 
 3350DEFFNXPOS=xpos%
 3360 
 3370DEFFNYPOS=ypos%
 3380 
 3390DEFPROCNOERROR
 3400error%=FALSE
 3410ENDPROC
 3420 
 3430DEFPROCerror(num%)
 3440PROCtext
 3450error%=TRUE
 3460IF num%=1 THEN PRINT "I'VE HIT A MAZE WALL"
 3470IF num%=2 THEN PRINT "I CAN NOT GO FORWARD LIKE THAT"
 3480IF num%=3 THEN PRINT "I CAN NOT TURN LEFT LIKE THAT"
 3490IF num%=4 THEN PRINT "I CAN NOT TURN RIGHT LIKE THAT"
 3500IF num%=5 THEN PRINT "ONE CHARACTER ONLY FOR A PAINT"
 3510IF num%=6 THEN PRINT "NON-PRINTING PAINTS NOT ALLOWED"
 3520IF num%=8 THEN PRINT "NO SUCH MAZE"
 3530IF num%=9 THEN PRINT "I'VE HIT THE EDGE OF THE WORLD"
 3540IF num%=10 THEN PRINT "I CAN'T JUMP THERE"
 3550PROCNOERROR:END
 3560ENDPROC
 3570 
 3580REM Short-form names
 3590DEFPROCFD(X%):PROCFORWARD(X%):ENDPROC
 3600DEFPROCRT(X%):PROCRIGHT(X%):ENDPROC
 3610DEFPROCLT(X%):PROCLEFT(X%):ENDPROC
 3620DEFPROCPU:PROCPENUP:ENDPROC
 3630DEFPROCPD:PROCPENDOWN:ENDPROC
 3640DEFPROCCP(X$):PROCCHANGEPAINT(X$):ENDPROC
 3650DEFPROCCS:PROCCLEARSCREEN:ENDPROC
 3660DEFPROCDR(X%,Y%): PROCDRAWTO(X%,Y%): ENDPROC
 3670DEFPROCJP(X%,Y%):PROCJUMPTO(X%,Y%):ENDPROC
 3680DEFPROCGM(X%):PROCGETMAZE(X%):ENDPROC
 3690DEFFNAH=FNAHEAD
 3700DEFFNUN=FNUNDER
 3710DEFFNHEADING=dir%*45
 3720DEFFNHE=dir%*45
 3730DEFFNXS=FNXSTART
 3740DEFFNXF=FNXFINISH
 3750DEFFNYS=FNYSTART
 3760DEFFNYF=FNYFINISH
 3770DEFFNXP=FNXPOS
 3780DEFFNYP=FNYPOS
 3790DEFFNFIN=FNFINISHED
 3800 
 3810REM The maze solving routines.
 3820 
 3830DEFFNwall
 3840=((FNAH=CHR$(0))OR(FNAH=CHR$(240)))
 3850 
 3860DEFFNleftwall
 3870LOCAL h%
 3880PROCLT(90)
 3890h%=FNwall
 3900PROCRT(90)
 3910=h%
 3920 
 3930DEFFNrightwall
 3940LOCAL h%
 3950PROCRT(90)
 3960h%=FNwall
 3970PROCLT(90)
 3980=h%
 3990 
 4000DEFFNdeadend
 4010LOCAL h%, i%
 4020h%=0
 4030PROCLT(90)
 4040FOR i%=1 TO 3
 4050IF FNwall THEN h%=h%+1
 4060PROCRT(90)
 4070NEXT
 4080PROCLT(90)
 4090=(h%=3)
 4100 
 4110DEFPROChugleft
 4120IF NOT FNleftwall THEN PROCLT(90):PROCFD(1):ENDPROC
 4130IF (FNwall AND NOT FNrightwall) THEN PROCRT(90):PROCFD(1):ENDPROC
 4140IF NOT FNwall THEN PROCFD(1):ENDPROC
 4150PROCRT(180):PROCFD(1)
 4160ENDPROC
 4170 
 4180DEFPROCTRYHUGLEFT
 4190REPEAT
 4200PROChugleft
 4210UNTIL FNFIN
 4220ENDPROC
 4230 
 4240DEFPROChugright
 4250IF NOT FNrightwall THEN PROCRT(90):PROCFD(1):ENDPROC
 4260IF (FNwall AND NOT FNleftwall) THEN PROCLT(90):PROCFD(1):ENDPROC
 4270IF NOT FNwall THEN PROCFD(1):ENDPROC
 4280PROCRT(180):PROCFD(1)
 4290ENDPROC
 4300 
 4310DEFPROCTRYHUGRIGHT
 4320REPEAT
 4330PROChugright
 4340UNTIL FNFIN
 4350ENDPROC
 4360 
 4370DEFPROCTRY(N%)
 4380PROCGM(N%)
 4390PROCCP("@")
 4400PRINT"Left wall hugging."
 4410PROCTRYHUGLEFT
 4420PROCJP(FNXS,FNYS)
 4430PROCCP("#")
 4440PRINT"Right wall hugging."
 4450PROCTRYHUGRIGHT
 4460ENDPROC

� M-TEXTURT
"� Model B Version, with mazes.
� Optimised for space.
("� Stephen Goudge, October 1982
2,� direction%(7,2),dirname$(7),world% 600
<� 4
F�initialise
P
�setup
Z�
d 
n 
x��initialise
�� cns%,cnt%
�� Character definitions
�&� 23,224,16,56,84,146,146,16,16,16
�&� 23,225,16,16,16,146,146,84,56,16
�$� 23,226,24,32,64,255,64,32,24,0
� � 23,227,24,4,2,255,2,4,24,0
�(� 23,228,252,192,160,144,136,132,2,1
�"� 23,229,128,64,33,17,9,5,3,63
�"� 23,230,63,3,5,9,17,33,64,128
�(� 23,231,1,2,132,136,144,160,192,252
�&� 23,232,24,60,126,255,24,24,24,24
�&� 23,233,24,24,24,24,255,126,60,24
�(� 23,234,16,48,112,255,255,112,48,16
$� 23,235,8,12,14,255,255,14,12,8
(� 23,236,124,248,240,248,204,134,3,1
&� 23,237,128,192,97,51,31,15,31,62
"&� 23,238,62,31,15,31,51,97,192,128
,(� 23,239,1,3,134,204,248,240,248,124
6,� 23,240,255,255,255,255,255,255,255,255
Jxoffset%=0:yoffset%=21
Tmaxx%=30:maxy%=20
^%xmax%=33:xmin%=2:ymax%=24:ymin%=3
h� cnt%=0 � 7
r>� direction%(cnt%,0),direction%(cnt%,1),direction%(cnt%,2)
|� dirname$(cnt%)
�
� cnt%
��
� 
�� 23,224,232,"North     "
�� 33,230,238,"North East"
�� 32,227,235,"East      "
�� 31,229,237,"South East"
�� 21,225,233,"South     "
�� 11,231,239,"South West"
�� 12,226,234,"West      "
�� 13,228,236,"North West"
� 
���setup

� cnt%
� 40,948
� 1104,948:� 1104,200
&� 40,200:� 40,948
0� 88,904
:� 1056,904:� 1056,248
D� 88,248:� 88,904
N� 40,948
X� 1056,904:� 1104,948
b� 1056,248:� 1104,200
l� 88,248:� 40,200
v� 5
�� Draw in numeric scale.
�� 96,940
�%� cnt%=1 � 30:�;cnt% � 10;:� cnt%
�� 96,240
�%� cnt%=1 � 30:�;cnt% � 10;:� cnt%
�� 48,280
�� cnt%=1 � 20
��;cnt% � 10;�(8);�(11);
�
� cnt%
�� 1064,280
�� cnt%=1 � 20
��;cnt% � 10;�(8);�(11);
��
� 4
4�0,26);"Dir:           Pos:        Paint:' '.";
�CLEARSCREEN
 �
* 
4��CLEARSCREEN
>
� cnt%
H�NOERROR
Rdir%=0:xpos%=1:ypos%=1
\+xstart%=-1:ystart%=-1:xfin%=-1:yfin%=-1
fpen%=2:paint$="*"
p� cnt%=0 � 600
zworld%?cnt%=32
�
� cnt%
�xtext%=�:ytext%=�
�(� 28,xmin%+1,ymax%-1,xmax%-1,ymin%+1
��
��writepaint
��writeturtle
�
�writedir
�
�writepos
��
��
� 
�
��text
�� 28,0,30,39,27
�xtext%,ytext%);
�
 
$
��data
.xtext%=�
8ytext%=�
B� 28,0,26,39,26
L�
V 
`
��play
jxtext%=�
tytext%=�
~ � 28,xmin%,ymax%,xmax%,ymin%
��
� 
���writedir
�	�data
��4,0);dirname$(dir%);
�	�text
��
� 
���writepos
�	�data
��19,0);"       ";
�$�19,0);"(";xpos%;",";ypos%;")";
	�text

�
 
��writeturtle
(	�play
2>�xoffset%+xpos%,yoffset%-ypos%);�(direction%(dir%,pen%));
<	�text
F�
P 
Z��writepaint
d	�data
n�34,0);paint$;
x	�text
��
� 
�
��move
�
� ny%,nx%
�(nx%=xpos%+�(direction%(dir%,0)/10)-2
�'ny%=ypos%+direction%(dir%,0) � 10-2
�:�(nx%<1)�(ny%<1)�(nx%>maxx%)�(ny%>maxy%) � �error(9):�
�4� pen%=2 � world%?((xpos%-1)*20+ypos%)=�(paint$)
�	�play
�C�xoffset%+xpos%,yoffset%-ypos%);�(world%?((xpos%-1)*20+ypos%))
�xpos%=nx%:ypos%=ny%
�	�text
��writeturtle

�writepos
�
 
"��JUMPTO(x%,y%)
,� error% � �
66�(x%<1)�(y%<1)�(x%>maxx%)�(y%>maxy%)� �error(10):�
@	�play
JC�xoffset%+xpos%,yoffset%-ypos%);�(world%?((xpos%-1)*20+ypos%))
Txpos%=x%:ypos%=y%
^	�text
h�writeturtle
r
�writepos
|�
� 
���DRAWTO(x1%,y1%)
�� x,y,dx,dy,xt%,yt%,length%
�� error% � �
�length%=�(x1%-xpos%)
�1� �(y1%-ypos%)>length% � length%=�(y1%-ypos%)
�1dx=(x1%-xpos%)/length%:dy=(y1%-ypos%)/length%
�x=xpos%+0.5:y=ypos%+0.5
�� length%=0 � �
��
�length%=length%-1
�xt%=�(x):yt%=�(y)
�;� (xt%>maxx%)�(xt%<1)�(yt%>maxy%)�(yt%<1) � �error(1):�
4� pen%=2 � world%?((xpos%-1)*20+ypos%)=�(paint$)
	�play
D�xoffset%+xpos%,yoffset%-ypos%);�(world%?((xpos%-1)*20+ypos%));
&x=x+dx:y=y+dy
0xpos%=xt%:ypos%=yt%
: �text:�writeturtle:�writepos
D� error% � (length%<0)
N4� pen%=2 � world%?((xpos%-1)*20+ypos%)=�(paint$)
X�
b 
l��FORWARD(num%)
v� error% � �
�� num%<1 � �error(2):�
��
�num%=num%-1:�move
�� error% � (num%<1)
��
� 
���turnleft
�� error% � �
�dir%=(dir%+7) � 8
��writeturtle:�writedir
��
� 
���turnright
� error% � �
dir%=(dir%+17) � 8
�writeturtle:�writedir
 �
* 
4��LEFT(degrees%)
>
� deg%
H� error% � �
Rdeg%=degrees% � 45
\5� (degrees%<>deg%*45)�(degrees%<=0) � �error(3):�
f�
p
�turnleft
zdeg%=deg%-1
�� (deg%=0)� error%
��
� 
���RIGHT(degrees%)
�
� deg%
�� error% � �
�deg%=degrees% � 45
�5� (degrees%<>deg%*45)�(degrees%<=0) � �error(4):�
��
��turnright
�deg%=deg%-1
�� (deg%=0)� error%
��
	 
	��PENUP
	� error% � �
	$pen%=1:�writeturtle
	.�
	8 
	B
��PENDOWN
	L� error% � �
	Vpen%=2:�writeturtle
	`�
	j 
	t��CHANGEPAINT(newp$)
	~� error% � �
	�� �(newp$)>1 � �error(5):�
	�� �(newp$)<32 � �error(6):�
	�paint$=newp$
	��writepaint
	��
	� 
	���start(x%,y%)
	��JP(x%,y%)
	�xstart%=x%:ystart%=y%
	��
	� 
	�ݤXSTART=xstart%
ݤYSTART=ystart%

��fin(x%,y%)
 world%?((x%-1)*20+y%)=�("F")
xfin%=x%:yfin%=y%
(	�play
2#�xoffset%+x%,yoffset%-y%);"F";
<	�text
F�CP(".")
P�
Z 
dݤXFINISH=xfin%
n 
xݤYFINISH=yfin%
� 
���GETMAZE(m%)
���GM(m%)
�� first%,second%,halt%
��CS
��CP(�(240))
�#�(m%<1) � (m%>7) � �error(11):�
�� m%=1 � � �tZK
�� m%=2 � � �tdK
�� m%=3 � � �tnK
�� m%=4 � � �dVK
�� m%=5 � � �dtK
�� m%=6 � � �TpL
� m%=7 � � �DlL
halt%=�
�
"� first%,second%
,!� first%=-10 � halt%=�:� �DTK
6�JP(first%,second%)
@� first%,second%
J�DR(first%,second%)
T� halt%
^� first%
h�start(second%,first%)
r� first%,second%
|�fin(first%,second%)
��
� 
� � 1,8,20,8,-10,4,2,6,14
�=� 8,4,8,20,22,1,22,16,8,4,18,4,12,16,22,16,-10,4,10,26,10
�N� 16,2,26,2,14,4,24,4,2,6,16,6,4,8,14,8,8,10,14,10,10,12,16,12,10,19,24,19
�B� 2,6,2,20,4,8,4,20,8,10,8,20,10,12,10,19,14,1,14,4,14,8,14,10
�0� 16,1,16,2,16,6,16,12,24,4,24,19,26,2,26,20
�� -10,15,1,3,20
�A� 6,2,18,2,8,4,18,4,8,8,22,8,6,10,20,10,1,14,12,14,1,16,10,16
�:� 12,19,20,19,6,2,6,10,8,4,8,8,10,16,10,20,12,14,12,19
�4� 18,2,18,4,20,10,20,19,22,8,22,20,-10,1,15,17,3
�=� 2,2,12,2,16,2,26,2,2,4,24,4,2,6,16,6,18,6,22,6,4,8,14,8
�@� 8,10,14,10,16,10,22,10,10,12,24,12,12,14,24,14,10,16,22,16
:� 10,18,24,18,26,18,28,18,10,20,30,20,2,2,2,4,2,6,2,20
C� 4,8,4,20,8,10,8,20,10,16,10,18,14,1,14,4,14,8,14,10,16,1,16,2
G� 16,6,16,10,18,6,18,10,20,7,20,8,24,4,24,12,24,14,24,18,26,2,26,18
&)� 28,2,28,18,30,1,30,20,-10,15,1,3,20
04� 1,20,8,20,2,2,12,2,16,2,26,2,2,4,24,4,2,6,16,6
:G� 18,6,22,6,4,8,14,8,8,10,14,10,16,10,22,10,10,12,24,12,10,16,23,16
D?� 12,14,24,14,2,18,8,18,10,18,24,18,26,18,28,18,12,20,28,20
ND� 2,2,2,4,2,6,2,18,4,8,4,18,8,10,8,18,10,12,10,19,14,1,14,4,14,8
XF� 14,10,16,1,16,2,16,6,16,10,18,6,18,10,24,4,24,12,26,2,26,18,28,2
b$� 28,18,30,1,30,19,-10,15,1,3,17
lE� 10,2,29,2,10,4,24,4,26,6,28,6,12,8,18,8,16,12,18,12,20,12,28,12
v>� 6,14,8,14,16,14,28,14,10,16,22,16,4,19,14,19,16,18,26,18
�E� 2,1,2,10,2,12,2,19,4,1,4,19,8,2,8,10,10,6,10,16,12,8,12,12,18,8
�/� 18,12,24,4,24,10,28,6,28,18,-10,1,1,14,10
� 
�ݤAHEAD
�� x%,y%
�'x%=xpos%+�(direction%(dir%,0)/10)-2
�'y%=ypos%+direction%(dir%,0) � 10 -2
�L� (x%<1)�(y%<1)�(x%>maxx%)�(y%>maxy%)� =�(0) � =�(world%?((x%-1)*20+y%))
� 
�ݤUNDER
�#=�(world%?((xpos%-1)*20+ypos%))
� 
�ݤFINISHED

"=((xpos%=xfin%)�(ypos%=yfin%))

 

ݤXPOS=xpos%

  

*ݤYPOS=ypos%

4 

>
��NOERROR

Herror%=�

R�

\ 

f��error(num%)

p	�text

zerror%=�

�'� num%=1 � � "I'VE HIT A MAZE WALL"

�1� num%=2 � � "I CAN NOT GO FORWARD LIKE THAT"

�0� num%=3 � � "I CAN NOT TURN LEFT LIKE THAT"

�1� num%=4 � � "I CAN NOT TURN RIGHT LIKE THAT"

�1� num%=5 � � "ONE CHARACTER ONLY FOR A PAINT"

�2� num%=6 � � "NON-PRINTING PAINTS NOT ALLOWED"

�� num%=8 � � "NO SUCH MAZE"

�1� num%=9 � � "I'VE HIT THE EDGE OF THE WORLD"

�&� num%=10 � � "I CAN'T JUMP THERE"

��NOERROR:�

��

� 

�� Short-form names
��FD(X%):�FORWARD(X%):�
��RT(X%):�RIGHT(X%):�
��LT(X%):�LEFT(X%):�
$��PU:�PENUP:�
.��PD:�PENDOWN:�
8��CP(X$):�CHANGEPAINT(X$):�
B��CS:�CLEARSCREEN:�
L"��DR(X%,Y%): �DRAWTO(X%,Y%): �
V ��JP(X%,Y%):�JUMPTO(X%,Y%):�
`��GM(X%):�GETMAZE(X%):�
jݤAH=�AHEAD
tݤUN=�UNDER
~ݤHEADING=dir%*45
�ݤHE=dir%*45
�ݤXS=�XSTART
�ݤXF=�XFINISH
�ݤYS=�YSTART
�ݤYF=�YFINISH
�ݤXP=�XPOS
�ݤYP=�YPOS
�ݤFIN=�FINISHED
� 
� � The maze solving routines.
� 
�
ݤwall
=((�AH=�(0))�(�AH=�(240)))

 
ݤleftwall
� h%
(�LT(90)
2h%=�wall
<�RT(90)
F=h%
P 
Zݤrightwall
d� h%
n�RT(90)
xh%=�wall
��LT(90)
�=h%
� 
�
ݤdeadend
�� h%, i%
�h%=0
��LT(90)
�� i%=1 � 3
�� �wall � h%=h%+1
��RT(90)
��
��LT(90)
�=(h%=3)
 

��hugleft
$� � �leftwall � �LT(90):�FD(1):�
"/� (�wall � � �rightwall) � �RT(90):�FD(1):�
,� � �wall � �FD(1):�
6�RT(180):�FD(1)
@�
J 
T��TRYHUGLEFT
^�
h�hugleft
r
� �FIN
|�
� 
���hugright
�%� � �rightwall � �RT(90):�FD(1):�
�.� (�wall � � �leftwall) � �LT(90):�FD(1):�
�� � �wall � �FD(1):�
��RT(180):�FD(1)
��
� 
���TRYHUGRIGHT
��
�
�hugright
�
� �FIN
��
 

��TRY(N%)
�GM(N%)
&�CP("@")
0�"Left wall hugging."
:�TRYHUGLEFT
D�JP(�XS,�YS)
N�CP("#")
X�"Right wall hugging."
b�TRYHUGRIGHT
l�
�
00000000  0d 00 0a 0f f4 20 4d 2d  54 45 58 54 55 52 54 0d  |..... M-TEXTURT.|
00000010  00 14 22 f4 20 4d 6f 64  65 6c 20 42 20 56 65 72  |..". Model B Ver|
00000020  73 69 6f 6e 2c 20 77 69  74 68 20 6d 61 7a 65 73  |sion, with mazes|
00000030  2e 0d 00 1e 1a f4 20 4f  70 74 69 6d 69 73 65 64  |...... Optimised|
00000040  20 66 6f 72 20 73 70 61  63 65 2e 0d 00 28 22 f4  | for space...(".|
00000050  20 53 74 65 70 68 65 6e  20 47 6f 75 64 67 65 2c  | Stephen Goudge,|
00000060  20 4f 63 74 6f 62 65 72  20 31 39 38 32 0d 00 32  | October 1982..2|
00000070  2c de 20 64 69 72 65 63  74 69 6f 6e 25 28 37 2c  |,. direction%(7,|
00000080  32 29 2c 64 69 72 6e 61  6d 65 24 28 37 29 2c 77  |2),dirname$(7),w|
00000090  6f 72 6c 64 25 20 36 30  30 0d 00 3c 07 eb 20 34  |orld% 600..<.. 4|
000000a0  0d 00 46 0f f2 69 6e 69  74 69 61 6c 69 73 65 0d  |..F..initialise.|
000000b0  00 50 0a f2 73 65 74 75  70 0d 00 5a 05 e0 0d 00  |.P..setup..Z....|
000000c0  64 05 20 0d 00 6e 05 20  0d 00 78 10 dd f2 69 6e  |d. ..n. ..x...in|
000000d0  69 74 69 61 6c 69 73 65  0d 00 82 0f ea 20 63 6e  |itialise..... cn|
000000e0  73 25 2c 63 6e 74 25 0d  00 8c 1b f4 20 43 68 61  |s%,cnt%..... Cha|
000000f0  72 61 63 74 65 72 20 64  65 66 69 6e 69 74 69 6f  |racter definitio|
00000100  6e 73 0d 00 96 26 ef 20  32 33 2c 32 32 34 2c 31  |ns...&. 23,224,1|
00000110  36 2c 35 36 2c 38 34 2c  31 34 36 2c 31 34 36 2c  |6,56,84,146,146,|
00000120  31 36 2c 31 36 2c 31 36  0d 00 a0 26 ef 20 32 33  |16,16,16...&. 23|
00000130  2c 32 32 35 2c 31 36 2c  31 36 2c 31 36 2c 31 34  |,225,16,16,16,14|
00000140  36 2c 31 34 36 2c 38 34  2c 35 36 2c 31 36 0d 00  |6,146,84,56,16..|
00000150  aa 24 ef 20 32 33 2c 32  32 36 2c 32 34 2c 33 32  |.$. 23,226,24,32|
00000160  2c 36 34 2c 32 35 35 2c  36 34 2c 33 32 2c 32 34  |,64,255,64,32,24|
00000170  2c 30 0d 00 b4 20 ef 20  32 33 2c 32 32 37 2c 32  |,0... . 23,227,2|
00000180  34 2c 34 2c 32 2c 32 35  35 2c 32 2c 34 2c 32 34  |4,4,2,255,2,4,24|
00000190  2c 30 0d 00 be 28 ef 20  32 33 2c 32 32 38 2c 32  |,0...(. 23,228,2|
000001a0  35 32 2c 31 39 32 2c 31  36 30 2c 31 34 34 2c 31  |52,192,160,144,1|
000001b0  33 36 2c 31 33 32 2c 32  2c 31 0d 00 c8 22 ef 20  |36,132,2,1...". |
000001c0  32 33 2c 32 32 39 2c 31  32 38 2c 36 34 2c 33 33  |23,229,128,64,33|
000001d0  2c 31 37 2c 39 2c 35 2c  33 2c 36 33 0d 00 d2 22  |,17,9,5,3,63..."|
000001e0  ef 20 32 33 2c 32 33 30  2c 36 33 2c 33 2c 35 2c  |. 23,230,63,3,5,|
000001f0  39 2c 31 37 2c 33 33 2c  36 34 2c 31 32 38 0d 00  |9,17,33,64,128..|
00000200  dc 28 ef 20 32 33 2c 32  33 31 2c 31 2c 32 2c 31  |.(. 23,231,1,2,1|
00000210  33 32 2c 31 33 36 2c 31  34 34 2c 31 36 30 2c 31  |32,136,144,160,1|
00000220  39 32 2c 32 35 32 0d 00  e6 26 ef 20 32 33 2c 32  |92,252...&. 23,2|
00000230  33 32 2c 32 34 2c 36 30  2c 31 32 36 2c 32 35 35  |32,24,60,126,255|
00000240  2c 32 34 2c 32 34 2c 32  34 2c 32 34 0d 00 f0 26  |,24,24,24,24...&|
00000250  ef 20 32 33 2c 32 33 33  2c 32 34 2c 32 34 2c 32  |. 23,233,24,24,2|
00000260  34 2c 32 34 2c 32 35 35  2c 31 32 36 2c 36 30 2c  |4,24,255,126,60,|
00000270  32 34 0d 00 fa 28 ef 20  32 33 2c 32 33 34 2c 31  |24...(. 23,234,1|
00000280  36 2c 34 38 2c 31 31 32  2c 32 35 35 2c 32 35 35  |6,48,112,255,255|
00000290  2c 31 31 32 2c 34 38 2c  31 36 0d 01 04 24 ef 20  |,112,48,16...$. |
000002a0  32 33 2c 32 33 35 2c 38  2c 31 32 2c 31 34 2c 32  |23,235,8,12,14,2|
000002b0  35 35 2c 32 35 35 2c 31  34 2c 31 32 2c 38 0d 01  |55,255,14,12,8..|
000002c0  0e 28 ef 20 32 33 2c 32  33 36 2c 31 32 34 2c 32  |.(. 23,236,124,2|
000002d0  34 38 2c 32 34 30 2c 32  34 38 2c 32 30 34 2c 31  |48,240,248,204,1|
000002e0  33 34 2c 33 2c 31 0d 01  18 26 ef 20 32 33 2c 32  |34,3,1...&. 23,2|
000002f0  33 37 2c 31 32 38 2c 31  39 32 2c 39 37 2c 35 31  |37,128,192,97,51|
00000300  2c 33 31 2c 31 35 2c 33  31 2c 36 32 0d 01 22 26  |,31,15,31,62.."&|
00000310  ef 20 32 33 2c 32 33 38  2c 36 32 2c 33 31 2c 31  |. 23,238,62,31,1|
00000320  35 2c 33 31 2c 35 31 2c  39 37 2c 31 39 32 2c 31  |5,31,51,97,192,1|
00000330  32 38 0d 01 2c 28 ef 20  32 33 2c 32 33 39 2c 31  |28..,(. 23,239,1|
00000340  2c 33 2c 31 33 34 2c 32  30 34 2c 32 34 38 2c 32  |,3,134,204,248,2|
00000350  34 30 2c 32 34 38 2c 31  32 34 0d 01 36 2c ef 20  |40,248,124..6,. |
00000360  32 33 2c 32 34 30 2c 32  35 35 2c 32 35 35 2c 32  |23,240,255,255,2|
00000370  35 35 2c 32 35 35 2c 32  35 35 2c 32 35 35 2c 32  |55,255,255,255,2|
00000380  35 35 2c 32 35 35 0d 01  4a 1a 78 6f 66 66 73 65  |55,255..J.xoffse|
00000390  74 25 3d 30 3a 79 6f 66  66 73 65 74 25 3d 32 31  |t%=0:yoffset%=21|
000003a0  0d 01 54 15 6d 61 78 78  25 3d 33 30 3a 6d 61 78  |..T.maxx%=30:max|
000003b0  79 25 3d 32 30 0d 01 5e  25 78 6d 61 78 25 3d 33  |y%=20..^%xmax%=3|
000003c0  33 3a 78 6d 69 6e 25 3d  32 3a 79 6d 61 78 25 3d  |3:xmin%=2:ymax%=|
000003d0  32 34 3a 79 6d 69 6e 25  3d 33 0d 01 68 10 e3 20  |24:ymin%=3..h.. |
000003e0  63 6e 74 25 3d 30 20 b8  20 37 0d 01 72 3e f3 20  |cnt%=0 . 7..r>. |
000003f0  64 69 72 65 63 74 69 6f  6e 25 28 63 6e 74 25 2c  |direction%(cnt%,|
00000400  30 29 2c 64 69 72 65 63  74 69 6f 6e 25 28 63 6e  |0),direction%(cn|
00000410  74 25 2c 31 29 2c 64 69  72 65 63 74 69 6f 6e 25  |t%,1),direction%|
00000420  28 63 6e 74 25 2c 32 29  0d 01 7c 14 f3 20 64 69  |(cnt%,2)..|.. di|
00000430  72 6e 61 6d 65 24 28 63  6e 74 25 29 0d 01 86 0a  |rname$(cnt%)....|
00000440  ed 20 63 6e 74 25 0d 01  90 05 e1 0d 01 9a 05 20  |. cnt%......... |
00000450  0d 01 a4 1d dc 20 32 33  2c 32 32 34 2c 32 33 32  |..... 23,224,232|
00000460  2c 22 4e 6f 72 74 68 20  20 20 20 20 22 0d 01 ae  |,"North     "...|
00000470  1d dc 20 33 33 2c 32 33  30 2c 32 33 38 2c 22 4e  |.. 33,230,238,"N|
00000480  6f 72 74 68 20 45 61 73  74 22 0d 01 b8 1d dc 20  |orth East"..... |
00000490  33 32 2c 32 32 37 2c 32  33 35 2c 22 45 61 73 74  |32,227,235,"East|
000004a0  20 20 20 20 20 20 22 0d  01 c2 1d dc 20 33 31 2c  |      "..... 31,|
000004b0  32 32 39 2c 32 33 37 2c  22 53 6f 75 74 68 20 45  |229,237,"South E|
000004c0  61 73 74 22 0d 01 cc 1d  dc 20 32 31 2c 32 32 35  |ast"..... 21,225|
000004d0  2c 32 33 33 2c 22 53 6f  75 74 68 20 20 20 20 20  |,233,"South     |
000004e0  22 0d 01 d6 1d dc 20 31  31 2c 32 33 31 2c 32 33  |"..... 11,231,23|
000004f0  39 2c 22 53 6f 75 74 68  20 57 65 73 74 22 0d 01  |9,"South West"..|
00000500  e0 1d dc 20 31 32 2c 32  32 36 2c 32 33 34 2c 22  |... 12,226,234,"|
00000510  57 65 73 74 20 20 20 20  20 20 22 0d 01 ea 1d dc  |West      ".....|
00000520  20 31 33 2c 32 32 38 2c  32 33 36 2c 22 4e 6f 72  | 13,228,236,"Nor|
00000530  74 68 20 57 65 73 74 22  0d 01 f4 05 20 0d 01 fe  |th West".... ...|
00000540  0b dd f2 73 65 74 75 70  0d 02 08 0a ea 20 63 6e  |...setup..... cn|
00000550  74 25 0d 02 12 0c ec 20  34 30 2c 39 34 38 0d 02  |t%..... 40,948..|
00000560  1c 19 df 20 31 31 30 34  2c 39 34 38 3a df 20 31  |... 1104,948:. 1|
00000570  31 30 34 2c 32 30 30 0d  02 26 15 df 20 34 30 2c  |104,200..&.. 40,|
00000580  32 30 30 3a df 20 34 30  2c 39 34 38 0d 02 30 0c  |200:. 40,948..0.|
00000590  ec 20 38 38 2c 39 30 34  0d 02 3a 19 df 20 31 30  |. 88,904..:.. 10|
000005a0  35 36 2c 39 30 34 3a df  20 31 30 35 36 2c 32 34  |56,904:. 1056,24|
000005b0  38 0d 02 44 15 df 20 38  38 2c 32 34 38 3a df 20  |8..D.. 88,248:. |
000005c0  38 38 2c 39 30 34 0d 02  4e 0c df 20 34 30 2c 39  |88,904..N.. 40,9|
000005d0  34 38 0d 02 58 19 ec 20  31 30 35 36 2c 39 30 34  |48..X.. 1056,904|
000005e0  3a df 20 31 31 30 34 2c  39 34 38 0d 02 62 19 ec  |:. 1104,948..b..|
000005f0  20 31 30 35 36 2c 32 34  38 3a df 20 31 31 30 34  | 1056,248:. 1104|
00000600  2c 32 30 30 0d 02 6c 15  ec 20 38 38 2c 32 34 38  |,200..l.. 88,248|
00000610  3a df 20 34 30 2c 32 30  30 0d 02 76 07 ef 20 35  |:. 40,200..v.. 5|
00000620  0d 02 80 1c f4 20 44 72  61 77 20 69 6e 20 6e 75  |..... Draw in nu|
00000630  6d 65 72 69 63 20 73 63  61 6c 65 2e 0d 02 8a 0c  |meric scale.....|
00000640  ec 20 39 36 2c 39 34 30  0d 02 94 25 e3 20 63 6e  |. 96,940...%. cn|
00000650  74 25 3d 31 20 b8 20 33  30 3a f1 3b 63 6e 74 25  |t%=1 . 30:.;cnt%|
00000660  20 83 20 31 30 3b 3a ed  20 63 6e 74 25 0d 02 9e  | . 10;:. cnt%...|
00000670  0c ec 20 39 36 2c 32 34  30 0d 02 a8 25 e3 20 63  |.. 96,240...%. c|
00000680  6e 74 25 3d 31 20 b8 20  33 30 3a f1 3b 63 6e 74  |nt%=1 . 30:.;cnt|
00000690  25 20 83 20 31 30 3b 3a  ed 20 63 6e 74 25 0d 02  |% . 10;:. cnt%..|
000006a0  b2 0c ec 20 34 38 2c 32  38 30 0d 02 bc 11 e3 20  |... 48,280..... |
000006b0  63 6e 74 25 3d 31 20 b8  20 32 30 0d 02 c6 1b f1  |cnt%=1 . 20.....|
000006c0  3b 63 6e 74 25 20 83 20  31 30 3b bd 28 38 29 3b  |;cnt% . 10;.(8);|
000006d0  bd 28 31 31 29 3b 0d 02  d0 0a ed 20 63 6e 74 25  |.(11);..... cnt%|
000006e0  0d 02 da 0e ec 20 31 30  36 34 2c 32 38 30 0d 02  |..... 1064,280..|
000006f0  e4 11 e3 20 63 6e 74 25  3d 31 20 b8 20 32 30 0d  |... cnt%=1 . 20.|
00000700  02 ee 1b f1 3b 63 6e 74  25 20 83 20 31 30 3b bd  |....;cnt% . 10;.|
00000710  28 38 29 3b bd 28 31 31  29 3b 0d 02 f8 05 ed 0d  |(8);.(11);......|
00000720  03 02 07 ef 20 34 0d 03  0c 34 f1 8a 30 2c 32 36  |.... 4...4..0,26|
00000730  29 3b 22 44 69 72 3a 20  20 20 20 20 20 20 20 20  |);"Dir:         |
00000740  20 20 50 6f 73 3a 20 20  20 20 20 20 20 20 50 61  |  Pos:        Pa|
00000750  69 6e 74 3a 27 20 27 2e  22 3b 0d 03 16 10 f2 43  |int:' '.";.....C|
00000760  4c 45 41 52 53 43 52 45  45 4e 0d 03 20 05 e1 0d  |LEARSCREEN.. ...|
00000770  03 2a 05 20 0d 03 34 11  dd f2 43 4c 45 41 52 53  |.*. ..4...CLEARS|
00000780  43 52 45 45 4e 0d 03 3e  0a ea 20 63 6e 74 25 0d  |CREEN..>.. cnt%.|
00000790  03 48 0c f2 4e 4f 45 52  52 4f 52 0d 03 52 1a 64  |.H..NOERROR..R.d|
000007a0  69 72 25 3d 30 3a 78 70  6f 73 25 3d 31 3a 79 70  |ir%=0:xpos%=1:yp|
000007b0  6f 73 25 3d 31 0d 03 5c  2b 78 73 74 61 72 74 25  |os%=1..\+xstart%|
000007c0  3d 2d 31 3a 79 73 74 61  72 74 25 3d 2d 31 3a 78  |=-1:ystart%=-1:x|
000007d0  66 69 6e 25 3d 2d 31 3a  79 66 69 6e 25 3d 2d 31  |fin%=-1:yfin%=-1|
000007e0  0d 03 66 15 70 65 6e 25  3d 32 3a 70 61 69 6e 74  |..f.pen%=2:paint|
000007f0  24 3d 22 2a 22 0d 03 70  12 e3 20 63 6e 74 25 3d  |$="*"..p.. cnt%=|
00000800  30 20 b8 20 36 30 30 0d  03 7a 12 77 6f 72 6c 64  |0 . 600..z.world|
00000810  25 3f 63 6e 74 25 3d 33  32 0d 03 84 0a ed 20 63  |%?cnt%=32..... c|
00000820  6e 74 25 0d 03 8e 15 78  74 65 78 74 25 3d b1 3a  |nt%....xtext%=.:|
00000830  79 74 65 78 74 25 3d bc  0d 03 98 28 ef 20 32 38  |ytext%=....(. 28|
00000840  2c 78 6d 69 6e 25 2b 31  2c 79 6d 61 78 25 2d 31  |,xmin%+1,ymax%-1|
00000850  2c 78 6d 61 78 25 2d 31  2c 79 6d 69 6e 25 2b 31  |,xmax%-1,ymin%+1|
00000860  0d 03 a2 05 db 0d 03 ac  0f f2 77 72 69 74 65 70  |..........writep|
00000870  61 69 6e 74 0d 03 b6 10  f2 77 72 69 74 65 74 75  |aint.....writetu|
00000880  72 74 6c 65 0d 03 c0 0d  f2 77 72 69 74 65 64 69  |rtle.....writedi|
00000890  72 0d 03 ca 0d f2 77 72  69 74 65 70 6f 73 0d 03  |r.....writepos..|
000008a0  d4 05 db 0d 03 de 05 e1  0d 03 e8 05 20 0d 03 f2  |............ ...|
000008b0  0a dd f2 74 65 78 74 0d  03 fc 13 ef 20 32 38 2c  |...text..... 28,|
000008c0  30 2c 33 30 2c 33 39 2c  32 37 0d 04 06 15 f1 8a  |0,30,39,27......|
000008d0  78 74 65 78 74 25 2c 79  74 65 78 74 25 29 3b 0d  |xtext%,ytext%);.|
000008e0  04 10 05 e1 0d 04 1a 05  20 0d 04 24 0a dd f2 64  |........ ..$...d|
000008f0  61 74 61 0d 04 2e 0c 78  74 65 78 74 25 3d b1 0d  |ata....xtext%=..|
00000900  04 38 0c 79 74 65 78 74  25 3d bc 0d 04 42 13 ef  |.8.ytext%=...B..|
00000910  20 32 38 2c 30 2c 32 36  2c 33 39 2c 32 36 0d 04  | 28,0,26,39,26..|
00000920  4c 05 e1 0d 04 56 05 20  0d 04 60 0a dd f2 70 6c  |L....V. ..`...pl|
00000930  61 79 0d 04 6a 0c 78 74  65 78 74 25 3d b1 0d 04  |ay..j.xtext%=...|
00000940  74 0c 79 74 65 78 74 25  3d bc 0d 04 7e 20 ef 20  |t.ytext%=...~ . |
00000950  32 38 2c 78 6d 69 6e 25  2c 79 6d 61 78 25 2c 78  |28,xmin%,ymax%,x|
00000960  6d 61 78 25 2c 79 6d 69  6e 25 0d 04 88 05 e1 0d  |max%,ymin%......|
00000970  04 92 05 20 0d 04 9c 0e  dd f2 77 72 69 74 65 64  |... ......writed|
00000980  69 72 0d 04 a6 09 f2 64  61 74 61 0d 04 b0 1a f1  |ir.....data.....|
00000990  8a 34 2c 30 29 3b 64 69  72 6e 61 6d 65 24 28 64  |.4,0);dirname$(d|
000009a0  69 72 25 29 3b 0d 04 ba  09 f2 74 65 78 74 0d 04  |ir%);.....text..|
000009b0  c4 05 e1 0d 04 ce 05 20  0d 04 d8 0e dd f2 77 72  |....... ......wr|
000009c0  69 74 65 70 6f 73 0d 04  e2 09 f2 64 61 74 61 0d  |itepos.....data.|
000009d0  04 ec 16 f1 8a 31 39 2c  30 29 3b 22 20 20 20 20  |.....19,0);"    |
000009e0  20 20 20 22 3b 0d 04 f6  24 f1 8a 31 39 2c 30 29  |   ";...$..19,0)|
000009f0  3b 22 28 22 3b 78 70 6f  73 25 3b 22 2c 22 3b 79  |;"(";xpos%;",";y|
00000a00  70 6f 73 25 3b 22 29 22  3b 0d 05 00 09 f2 74 65  |pos%;")";.....te|
00000a10  78 74 0d 05 0a 05 e1 0d  05 14 05 20 0d 05 1e 11  |xt......... ....|
00000a20  dd f2 77 72 69 74 65 74  75 72 74 6c 65 0d 05 28  |..writeturtle..(|
00000a30  09 f2 70 6c 61 79 0d 05  32 3e f1 8a 78 6f 66 66  |..play..2>..xoff|
00000a40  73 65 74 25 2b 78 70 6f  73 25 2c 79 6f 66 66 73  |set%+xpos%,yoffs|
00000a50  65 74 25 2d 79 70 6f 73  25 29 3b bd 28 64 69 72  |et%-ypos%);.(dir|
00000a60  65 63 74 69 6f 6e 25 28  64 69 72 25 2c 70 65 6e  |ection%(dir%,pen|
00000a70  25 29 29 3b 0d 05 3c 09  f2 74 65 78 74 0d 05 46  |%));..<..text..F|
00000a80  05 e1 0d 05 50 05 20 0d  05 5a 10 dd f2 77 72 69  |....P. ..Z...wri|
00000a90  74 65 70 61 69 6e 74 0d  05 64 09 f2 64 61 74 61  |tepaint..d..data|
00000aa0  0d 05 6e 13 f1 8a 33 34  2c 30 29 3b 70 61 69 6e  |..n...34,0);pain|
00000ab0  74 24 3b 0d 05 78 09 f2  74 65 78 74 0d 05 82 05  |t$;..x..text....|
00000ac0  e1 0d 05 8c 05 20 0d 05  96 0a dd f2 6d 6f 76 65  |..... ......move|
00000ad0  0d 05 a0 0d ea 20 6e 79  25 2c 6e 78 25 0d 05 aa  |..... ny%,nx%...|
00000ae0  28 6e 78 25 3d 78 70 6f  73 25 2b a8 28 64 69 72  |(nx%=xpos%+.(dir|
00000af0  65 63 74 69 6f 6e 25 28  64 69 72 25 2c 30 29 2f  |ection%(dir%,0)/|
00000b00  31 30 29 2d 32 0d 05 b4  27 6e 79 25 3d 79 70 6f  |10)-2...'ny%=ypo|
00000b10  73 25 2b 64 69 72 65 63  74 69 6f 6e 25 28 64 69  |s%+direction%(di|
00000b20  72 25 2c 30 29 20 83 20  31 30 2d 32 0d 05 be 3a  |r%,0) . 10-2...:|
00000b30  e7 28 6e 78 25 3c 31 29  84 28 6e 79 25 3c 31 29  |.(nx%<1).(ny%<1)|
00000b40  84 28 6e 78 25 3e 6d 61  78 78 25 29 84 28 6e 79  |.(nx%>maxx%).(ny|
00000b50  25 3e 6d 61 78 79 25 29  20 8c 20 f2 65 72 72 6f  |%>maxy%) . .erro|
00000b60  72 28 39 29 3a e1 0d 05  c8 34 e7 20 70 65 6e 25  |r(9):....4. pen%|
00000b70  3d 32 20 8c 20 77 6f 72  6c 64 25 3f 28 28 78 70  |=2 . world%?((xp|
00000b80  6f 73 25 2d 31 29 2a 32  30 2b 79 70 6f 73 25 29  |os%-1)*20+ypos%)|
00000b90  3d 97 28 70 61 69 6e 74  24 29 0d 05 d2 09 f2 70  |=.(paint$).....p|
00000ba0  6c 61 79 0d 05 dc 43 f1  8a 78 6f 66 66 73 65 74  |lay...C..xoffset|
00000bb0  25 2b 78 70 6f 73 25 2c  79 6f 66 66 73 65 74 25  |%+xpos%,yoffset%|
00000bc0  2d 79 70 6f 73 25 29 3b  bd 28 77 6f 72 6c 64 25  |-ypos%);.(world%|
00000bd0  3f 28 28 78 70 6f 73 25  2d 31 29 2a 32 30 2b 79  |?((xpos%-1)*20+y|
00000be0  70 6f 73 25 29 29 0d 05  e6 17 78 70 6f 73 25 3d  |pos%))....xpos%=|
00000bf0  6e 78 25 3a 79 70 6f 73  25 3d 6e 79 25 0d 05 f0  |nx%:ypos%=ny%...|
00000c00  09 f2 74 65 78 74 0d 05  fa 10 f2 77 72 69 74 65  |..text.....write|
00000c10  74 75 72 74 6c 65 0d 06  04 0d f2 77 72 69 74 65  |turtle.....write|
00000c20  70 6f 73 0d 06 0e 05 e1  0d 06 18 05 20 0d 06 22  |pos......... .."|
00000c30  13 dd f2 4a 55 4d 50 54  4f 28 78 25 2c 79 25 29  |...JUMPTO(x%,y%)|
00000c40  0d 06 2c 10 e7 20 65 72  72 6f 72 25 20 8c 20 e1  |..,.. error% . .|
00000c50  0d 06 36 36 e7 28 78 25  3c 31 29 84 28 79 25 3c  |..66.(x%<1).(y%<|
00000c60  31 29 84 28 78 25 3e 6d  61 78 78 25 29 84 28 79  |1).(x%>maxx%).(y|
00000c70  25 3e 6d 61 78 79 25 29  8c 20 f2 65 72 72 6f 72  |%>maxy%). .error|
00000c80  28 31 30 29 3a e1 0d 06  40 09 f2 70 6c 61 79 0d  |(10):...@..play.|
00000c90  06 4a 43 f1 8a 78 6f 66  66 73 65 74 25 2b 78 70  |.JC..xoffset%+xp|
00000ca0  6f 73 25 2c 79 6f 66 66  73 65 74 25 2d 79 70 6f  |os%,yoffset%-ypo|
00000cb0  73 25 29 3b bd 28 77 6f  72 6c 64 25 3f 28 28 78  |s%);.(world%?((x|
00000cc0  70 6f 73 25 2d 31 29 2a  32 30 2b 79 70 6f 73 25  |pos%-1)*20+ypos%|
00000cd0  29 29 0d 06 54 15 78 70  6f 73 25 3d 78 25 3a 79  |))..T.xpos%=x%:y|
00000ce0  70 6f 73 25 3d 79 25 0d  06 5e 09 f2 74 65 78 74  |pos%=y%..^..text|
00000cf0  0d 06 68 10 f2 77 72 69  74 65 74 75 72 74 6c 65  |..h..writeturtle|
00000d00  0d 06 72 0d f2 77 72 69  74 65 70 6f 73 0d 06 7c  |..r..writepos..||
00000d10  05 e1 0d 06 86 05 20 0d  06 90 15 dd f2 44 52 41  |...... ......DRA|
00000d20  57 54 4f 28 78 31 25 2c  79 31 25 29 0d 06 9a 1f  |WTO(x1%,y1%)....|
00000d30  ea 20 78 2c 79 2c 64 78  2c 64 79 2c 78 74 25 2c  |. x,y,dx,dy,xt%,|
00000d40  79 74 25 2c 6c 65 6e 67  74 68 25 0d 06 a4 10 e7  |yt%,length%.....|
00000d50  20 65 72 72 6f 72 25 20  8c 20 e1 0d 06 ae 18 6c  | error% . .....l|
00000d60  65 6e 67 74 68 25 3d 94  28 78 31 25 2d 78 70 6f  |ength%=.(x1%-xpo|
00000d70  73 25 29 0d 06 b8 31 e7  20 94 28 79 31 25 2d 79  |s%)...1. .(y1%-y|
00000d80  70 6f 73 25 29 3e 6c 65  6e 67 74 68 25 20 8c 20  |pos%)>length% . |
00000d90  6c 65 6e 67 74 68 25 3d  94 28 79 31 25 2d 79 70  |length%=.(y1%-yp|
00000da0  6f 73 25 29 0d 06 c2 31  64 78 3d 28 78 31 25 2d  |os%)...1dx=(x1%-|
00000db0  78 70 6f 73 25 29 2f 6c  65 6e 67 74 68 25 3a 64  |xpos%)/length%:d|
00000dc0  79 3d 28 79 31 25 2d 79  70 6f 73 25 29 2f 6c 65  |y=(y1%-ypos%)/le|
00000dd0  6e 67 74 68 25 0d 06 cc  1b 78 3d 78 70 6f 73 25  |ngth%....x=xpos%|
00000de0  2b 30 2e 35 3a 79 3d 79  70 6f 73 25 2b 30 2e 35  |+0.5:y=ypos%+0.5|
00000df0  0d 06 d6 13 e7 20 6c 65  6e 67 74 68 25 3d 30 20  |..... length%=0 |
00000e00  8c 20 e1 0d 06 e0 05 f5  0d 06 ea 15 6c 65 6e 67  |. ..........leng|
00000e10  74 68 25 3d 6c 65 6e 67  74 68 25 2d 31 0d 06 f4  |th%=length%-1...|
00000e20  15 78 74 25 3d a8 28 78  29 3a 79 74 25 3d a8 28  |.xt%=.(x):yt%=.(|
00000e30  79 29 0d 06 fe 3b e7 20  28 78 74 25 3e 6d 61 78  |y)...;. (xt%>max|
00000e40  78 25 29 84 28 78 74 25  3c 31 29 84 28 79 74 25  |x%).(xt%<1).(yt%|
00000e50  3e 6d 61 78 79 25 29 84  28 79 74 25 3c 31 29 20  |>maxy%).(yt%<1) |
00000e60  8c 20 f2 65 72 72 6f 72  28 31 29 3a e1 0d 07 08  |. .error(1):....|
00000e70  34 e7 20 70 65 6e 25 3d  32 20 8c 20 77 6f 72 6c  |4. pen%=2 . worl|
00000e80  64 25 3f 28 28 78 70 6f  73 25 2d 31 29 2a 32 30  |d%?((xpos%-1)*20|
00000e90  2b 79 70 6f 73 25 29 3d  97 28 70 61 69 6e 74 24  |+ypos%)=.(paint$|
00000ea0  29 0d 07 12 09 f2 70 6c  61 79 0d 07 1c 44 f1 8a  |).....play...D..|
00000eb0  78 6f 66 66 73 65 74 25  2b 78 70 6f 73 25 2c 79  |xoffset%+xpos%,y|
00000ec0  6f 66 66 73 65 74 25 2d  79 70 6f 73 25 29 3b bd  |offset%-ypos%);.|
00000ed0  28 77 6f 72 6c 64 25 3f  28 28 78 70 6f 73 25 2d  |(world%?((xpos%-|
00000ee0  31 29 2a 32 30 2b 79 70  6f 73 25 29 29 3b 0d 07  |1)*20+ypos%));..|
00000ef0  26 11 78 3d 78 2b 64 78  3a 79 3d 79 2b 64 79 0d  |&.x=x+dx:y=y+dy.|
00000f00  07 30 17 78 70 6f 73 25  3d 78 74 25 3a 79 70 6f  |.0.xpos%=xt%:ypo|
00000f10  73 25 3d 79 74 25 0d 07  3a 20 f2 74 65 78 74 3a  |s%=yt%..: .text:|
00000f20  f2 77 72 69 74 65 74 75  72 74 6c 65 3a f2 77 72  |.writeturtle:.wr|
00000f30  69 74 65 70 6f 73 0d 07  44 1a fd 20 65 72 72 6f  |itepos..D.. erro|
00000f40  72 25 20 84 20 28 6c 65  6e 67 74 68 25 3c 30 29  |r% . (length%<0)|
00000f50  0d 07 4e 34 e7 20 70 65  6e 25 3d 32 20 8c 20 77  |..N4. pen%=2 . w|
00000f60  6f 72 6c 64 25 3f 28 28  78 70 6f 73 25 2d 31 29  |orld%?((xpos%-1)|
00000f70  2a 32 30 2b 79 70 6f 73  25 29 3d 97 28 70 61 69  |*20+ypos%)=.(pai|
00000f80  6e 74 24 29 0d 07 58 05  e1 0d 07 62 05 20 0d 07  |nt$)..X....b. ..|
00000f90  6c 13 dd f2 46 4f 52 57  41 52 44 28 6e 75 6d 25  |l...FORWARD(num%|
00000fa0  29 0d 07 76 10 e7 20 65  72 72 6f 72 25 20 8c 20  |)..v.. error% . |
00000fb0  e1 0d 07 80 1a e7 20 6e  75 6d 25 3c 31 20 8c 20  |...... num%<1 . |
00000fc0  f2 65 72 72 6f 72 28 32  29 3a e1 0d 07 8a 05 f5  |.error(2):......|
00000fd0  0d 07 94 15 6e 75 6d 25  3d 6e 75 6d 25 2d 31 3a  |....num%=num%-1:|
00000fe0  f2 6d 6f 76 65 0d 07 9e  17 fd 20 65 72 72 6f 72  |.move..... error|
00000ff0  25 20 84 20 28 6e 75 6d  25 3c 31 29 0d 07 a8 05  |% . (num%<1)....|
00001000  e1 0d 07 b2 05 20 0d 07  bc 0e dd f2 74 75 72 6e  |..... ......turn|
00001010  6c 65 66 74 0d 07 c6 10  e7 20 65 72 72 6f 72 25  |left..... error%|
00001020  20 8c 20 e1 0d 07 d0 15  64 69 72 25 3d 28 64 69  | . .....dir%=(di|
00001030  72 25 2b 37 29 20 83 20  38 0d 07 da 1a f2 77 72  |r%+7) . 8.....wr|
00001040  69 74 65 74 75 72 74 6c  65 3a f2 77 72 69 74 65  |iteturtle:.write|
00001050  64 69 72 0d 07 e4 05 e1  0d 07 ee 05 20 0d 07 f8  |dir......... ...|
00001060  0f dd f2 74 75 72 6e 72  69 67 68 74 0d 08 02 10  |...turnright....|
00001070  e7 20 65 72 72 6f 72 25  20 8c 20 e1 0d 08 0c 16  |. error% . .....|
00001080  64 69 72 25 3d 28 64 69  72 25 2b 31 37 29 20 83  |dir%=(dir%+17) .|
00001090  20 38 0d 08 16 1a f2 77  72 69 74 65 74 75 72 74  | 8.....writeturt|
000010a0  6c 65 3a f2 77 72 69 74  65 64 69 72 0d 08 20 05  |le:.writedir.. .|
000010b0  e1 0d 08 2a 05 20 0d 08  34 14 dd f2 4c 45 46 54  |...*. ..4...LEFT|
000010c0  28 64 65 67 72 65 65 73  25 29 0d 08 3e 0a ea 20  |(degrees%)..>.. |
000010d0  64 65 67 25 0d 08 48 10  e7 20 65 72 72 6f 72 25  |deg%..H.. error%|
000010e0  20 8c 20 e1 0d 08 52 16  64 65 67 25 3d 64 65 67  | . ...R.deg%=deg|
000010f0  72 65 65 73 25 20 81 20  34 35 0d 08 5c 35 e7 20  |rees% . 45..\5. |
00001100  28 64 65 67 72 65 65 73  25 3c 3e 64 65 67 25 2a  |(degrees%<>deg%*|
00001110  34 35 29 84 28 64 65 67  72 65 65 73 25 3c 3d 30  |45).(degrees%<=0|
00001120  29 20 8c 20 f2 65 72 72  6f 72 28 33 29 3a e1 0d  |) . .error(3):..|
00001130  08 66 05 f5 0d 08 70 0d  f2 74 75 72 6e 6c 65 66  |.f....p..turnlef|
00001140  74 0d 08 7a 0f 64 65 67  25 3d 64 65 67 25 2d 31  |t..z.deg%=deg%-1|
00001150  0d 08 84 16 fd 20 28 64  65 67 25 3d 30 29 84 20  |..... (deg%=0). |
00001160  65 72 72 6f 72 25 0d 08  8e 05 e1 0d 08 98 05 20  |error%......... |
00001170  0d 08 a2 15 dd f2 52 49  47 48 54 28 64 65 67 72  |......RIGHT(degr|
00001180  65 65 73 25 29 0d 08 ac  0a ea 20 64 65 67 25 0d  |ees%)..... deg%.|
00001190  08 b6 10 e7 20 65 72 72  6f 72 25 20 8c 20 e1 0d  |.... error% . ..|
000011a0  08 c0 16 64 65 67 25 3d  64 65 67 72 65 65 73 25  |...deg%=degrees%|
000011b0  20 81 20 34 35 0d 08 ca  35 e7 20 28 64 65 67 72  | . 45...5. (degr|
000011c0  65 65 73 25 3c 3e 64 65  67 25 2a 34 35 29 84 28  |ees%<>deg%*45).(|
000011d0  64 65 67 72 65 65 73 25  3c 3d 30 29 20 8c 20 f2  |degrees%<=0) . .|
000011e0  65 72 72 6f 72 28 34 29  3a e1 0d 08 d4 05 f5 0d  |error(4):.......|
000011f0  08 de 0e f2 74 75 72 6e  72 69 67 68 74 0d 08 e8  |....turnright...|
00001200  0f 64 65 67 25 3d 64 65  67 25 2d 31 0d 08 f2 16  |.deg%=deg%-1....|
00001210  fd 20 28 64 65 67 25 3d  30 29 84 20 65 72 72 6f  |. (deg%=0). erro|
00001220  72 25 0d 08 fc 05 e1 0d  09 06 05 20 0d 09 10 0b  |r%......... ....|
00001230  dd f2 50 45 4e 55 50 0d  09 1a 10 e7 20 65 72 72  |..PENUP..... err|
00001240  6f 72 25 20 8c 20 e1 0d  09 24 17 70 65 6e 25 3d  |or% . ...$.pen%=|
00001250  31 3a f2 77 72 69 74 65  74 75 72 74 6c 65 0d 09  |1:.writeturtle..|
00001260  2e 05 e1 0d 09 38 05 20  0d 09 42 0d dd f2 50 45  |.....8. ..B...PE|
00001270  4e 44 4f 57 4e 0d 09 4c  10 e7 20 65 72 72 6f 72  |NDOWN..L.. error|
00001280  25 20 8c 20 e1 0d 09 56  17 70 65 6e 25 3d 32 3a  |% . ...V.pen%=2:|
00001290  f2 77 72 69 74 65 74 75  72 74 6c 65 0d 09 60 05  |.writeturtle..`.|
000012a0  e1 0d 09 6a 05 20 0d 09  74 18 dd f2 43 48 41 4e  |...j. ..t...CHAN|
000012b0  47 45 50 41 49 4e 54 28  6e 65 77 70 24 29 0d 09  |GEPAINT(newp$)..|
000012c0  7e 10 e7 20 65 72 72 6f  72 25 20 8c 20 e1 0d 09  |~.. error% . ...|
000012d0  88 1e e7 20 a9 28 6e 65  77 70 24 29 3e 31 20 8c  |... .(newp$)>1 .|
000012e0  20 f2 65 72 72 6f 72 28  35 29 3a e1 0d 09 92 1f  | .error(5):.....|
000012f0  e7 20 97 28 6e 65 77 70  24 29 3c 33 32 20 8c 20  |. .(newp$)<32 . |
00001300  f2 65 72 72 6f 72 28 36  29 3a e1 0d 09 9c 10 70  |.error(6):.....p|
00001310  61 69 6e 74 24 3d 6e 65  77 70 24 0d 09 a6 0f f2  |aint$=newp$.....|
00001320  77 72 69 74 65 70 61 69  6e 74 0d 09 b0 05 e1 0d  |writepaint......|
00001330  09 ba 05 20 0d 09 c4 12  dd f2 73 74 61 72 74 28  |... ......start(|
00001340  78 25 2c 79 25 29 0d 09  ce 0e f2 4a 50 28 78 25  |x%,y%).....JP(x%|
00001350  2c 79 25 29 0d 09 d8 19  78 73 74 61 72 74 25 3d  |,y%)....xstart%=|
00001360  78 25 3a 79 73 74 61 72  74 25 3d 79 25 0d 09 e2  |x%:ystart%=y%...|
00001370  05 e1 0d 09 ec 05 20 0d  09 f6 14 dd a4 58 53 54  |...... ......XST|
00001380  41 52 54 3d 78 73 74 61  72 74 25 0d 0a 00 14 dd  |ART=xstart%.....|
00001390  a4 59 53 54 41 52 54 3d  79 73 74 61 72 74 25 0d  |.YSTART=ystart%.|
000013a0  0a 0a 10 dd f2 66 69 6e  28 78 25 2c 79 25 29 0d  |.....fin(x%,y%).|
000013b0  0a 14 20 77 6f 72 6c 64  25 3f 28 28 78 25 2d 31  |.. world%?((x%-1|
000013c0  29 2a 32 30 2b 79 25 29  3d 97 28 22 46 22 29 0d  |)*20+y%)=.("F").|
000013d0  0a 1e 15 78 66 69 6e 25  3d 78 25 3a 79 66 69 6e  |...xfin%=x%:yfin|
000013e0  25 3d 79 25 0d 0a 28 09  f2 70 6c 61 79 0d 0a 32  |%=y%..(..play..2|
000013f0  23 f1 8a 78 6f 66 66 73  65 74 25 2b 78 25 2c 79  |#..xoffset%+x%,y|
00001400  6f 66 66 73 65 74 25 2d  79 25 29 3b 22 46 22 3b  |offset%-y%);"F";|
00001410  0d 0a 3c 09 f2 74 65 78  74 0d 0a 46 0c f2 43 50  |..<..text..F..CP|
00001420  28 22 2e 22 29 0d 0a 50  05 e1 0d 0a 5a 05 20 0d  |(".")..P....Z. .|
00001430  0a 64 13 dd a4 58 46 49  4e 49 53 48 3d 78 66 69  |.d...XFINISH=xfi|
00001440  6e 25 0d 0a 6e 05 20 0d  0a 78 13 dd a4 59 46 49  |n%..n. ..x...YFI|
00001450  4e 49 53 48 3d 79 66 69  6e 25 0d 0a 82 05 20 0d  |NISH=yfin%.... .|
00001460  0a 8c 11 dd f2 47 45 54  4d 41 5a 45 28 6d 25 29  |.....GETMAZE(m%)|
00001470  0d 0a 96 0c dd f2 47 4d  28 6d 25 29 0d 0a a0 1a  |......GM(m%)....|
00001480  ea 20 66 69 72 73 74 25  2c 73 65 63 6f 6e 64 25  |. first%,second%|
00001490  2c 68 61 6c 74 25 0d 0a  aa 07 f2 43 53 0d 0a b4  |,halt%.....CS...|
000014a0  0f f2 43 50 28 bd 28 32  34 30 29 29 0d 0a be 23  |..CP(.(240))...#|
000014b0  e7 28 6d 25 3c 31 29 20  84 20 28 6d 25 3e 37 29  |.(m%<1) . (m%>7)|
000014c0  20 8c 20 f2 65 72 72 6f  72 28 31 31 29 3a e1 0d  | . .error(11):..|
000014d0  0a c8 13 e7 20 6d 25 3d  31 20 8c 20 f7 20 8d 74  |.... m%=1 . . .t|
000014e0  5a 4b 0d 0a d2 13 e7 20  6d 25 3d 32 20 8c 20 f7  |ZK..... m%=2 . .|
000014f0  20 8d 74 64 4b 0d 0a dc  13 e7 20 6d 25 3d 33 20  | .tdK..... m%=3 |
00001500  8c 20 f7 20 8d 74 6e 4b  0d 0a e6 13 e7 20 6d 25  |. . .tnK..... m%|
00001510  3d 34 20 8c 20 f7 20 8d  64 56 4b 0d 0a f0 13 e7  |=4 . . .dVK.....|
00001520  20 6d 25 3d 35 20 8c 20  f7 20 8d 64 74 4b 0d 0a  | m%=5 . . .dtK..|
00001530  fa 13 e7 20 6d 25 3d 36  20 8c 20 f7 20 8d 54 70  |... m%=6 . . .Tp|
00001540  4c 0d 0b 04 13 e7 20 6d  25 3d 37 20 8c 20 f7 20  |L..... m%=7 . . |
00001550  8d 44 6c 4c 0d 0b 0e 0b  68 61 6c 74 25 3d a3 0d  |.DlL....halt%=..|
00001560  0b 18 05 f5 0d 0b 22 14  f3 20 66 69 72 73 74 25  |......".. first%|
00001570  2c 73 65 63 6f 6e 64 25  0d 0b 2c 21 e7 20 66 69  |,second%..,!. fi|
00001580  72 73 74 25 3d 2d 31 30  20 8c 20 68 61 6c 74 25  |rst%=-10 . halt%|
00001590  3d b9 3a e5 20 8d 44 54  4b 0d 0b 36 17 f2 4a 50  |=.:. .DTK..6..JP|
000015a0  28 66 69 72 73 74 25 2c  73 65 63 6f 6e 64 25 29  |(first%,second%)|
000015b0  0d 0b 40 14 f3 20 66 69  72 73 74 25 2c 73 65 63  |..@.. first%,sec|
000015c0  6f 6e 64 25 0d 0b 4a 17  f2 44 52 28 66 69 72 73  |ond%..J..DR(firs|
000015d0  74 25 2c 73 65 63 6f 6e  64 25 29 0d 0b 54 0b fd  |t%,second%)..T..|
000015e0  20 68 61 6c 74 25 0d 0b  5e 0c f3 20 66 69 72 73  | halt%..^.. firs|
000015f0  74 25 0d 0b 68 1a f2 73  74 61 72 74 28 73 65 63  |t%..h..start(sec|
00001600  6f 6e 64 25 2c 66 69 72  73 74 25 29 0d 0b 72 14  |ond%,first%)..r.|
00001610  f3 20 66 69 72 73 74 25  2c 73 65 63 6f 6e 64 25  |. first%,second%|
00001620  0d 0b 7c 18 f2 66 69 6e  28 66 69 72 73 74 25 2c  |..|..fin(first%,|
00001630  73 65 63 6f 6e 64 25 29  0d 0b 86 05 e1 0d 0b 90  |second%)........|
00001640  05 20 0d 0b 9a 1c 20 dc  20 31 2c 38 2c 32 30 2c  |. .... . 1,8,20,|
00001650  38 2c 2d 31 30 2c 34 2c  32 2c 36 2c 31 34 0d 0b  |8,-10,4,2,6,14..|
00001660  a4 3d dc 20 38 2c 34 2c  38 2c 32 30 2c 32 32 2c  |.=. 8,4,8,20,22,|
00001670  31 2c 32 32 2c 31 36 2c  38 2c 34 2c 31 38 2c 34  |1,22,16,8,4,18,4|
00001680  2c 31 32 2c 31 36 2c 32  32 2c 31 36 2c 2d 31 30  |,12,16,22,16,-10|
00001690  2c 34 2c 31 30 2c 32 36  2c 31 30 0d 0b ae 4e dc  |,4,10,26,10...N.|
000016a0  20 31 36 2c 32 2c 32 36  2c 32 2c 31 34 2c 34 2c  | 16,2,26,2,14,4,|
000016b0  32 34 2c 34 2c 32 2c 36  2c 31 36 2c 36 2c 34 2c  |24,4,2,6,16,6,4,|
000016c0  38 2c 31 34 2c 38 2c 38  2c 31 30 2c 31 34 2c 31  |8,14,8,8,10,14,1|
000016d0  30 2c 31 30 2c 31 32 2c  31 36 2c 31 32 2c 31 30  |0,10,12,16,12,10|
000016e0  2c 31 39 2c 32 34 2c 31  39 0d 0b b8 42 dc 20 32  |,19,24,19...B. 2|
000016f0  2c 36 2c 32 2c 32 30 2c  34 2c 38 2c 34 2c 32 30  |,6,2,20,4,8,4,20|
00001700  2c 38 2c 31 30 2c 38 2c  32 30 2c 31 30 2c 31 32  |,8,10,8,20,10,12|
00001710  2c 31 30 2c 31 39 2c 31  34 2c 31 2c 31 34 2c 34  |,10,19,14,1,14,4|
00001720  2c 31 34 2c 38 2c 31 34  2c 31 30 0d 0b c2 30 dc  |,14,8,14,10...0.|
00001730  20 31 36 2c 31 2c 31 36  2c 32 2c 31 36 2c 36 2c  | 16,1,16,2,16,6,|
00001740  31 36 2c 31 32 2c 32 34  2c 34 2c 32 34 2c 31 39  |16,12,24,4,24,19|
00001750  2c 32 36 2c 32 2c 32 36  2c 32 30 0d 0b cc 13 dc  |,26,2,26,20.....|
00001760  20 2d 31 30 2c 31 35 2c  31 2c 33 2c 32 30 0d 0b  | -10,15,1,3,20..|
00001770  d6 41 dc 20 36 2c 32 2c  31 38 2c 32 2c 38 2c 34  |.A. 6,2,18,2,8,4|
00001780  2c 31 38 2c 34 2c 38 2c  38 2c 32 32 2c 38 2c 36  |,18,4,8,8,22,8,6|
00001790  2c 31 30 2c 32 30 2c 31  30 2c 31 2c 31 34 2c 31  |,10,20,10,1,14,1|
000017a0  32 2c 31 34 2c 31 2c 31  36 2c 31 30 2c 31 36 0d  |2,14,1,16,10,16.|
000017b0  0b e0 3a dc 20 31 32 2c  31 39 2c 32 30 2c 31 39  |..:. 12,19,20,19|
000017c0  2c 36 2c 32 2c 36 2c 31  30 2c 38 2c 34 2c 38 2c  |,6,2,6,10,8,4,8,|
000017d0  38 2c 31 30 2c 31 36 2c  31 30 2c 32 30 2c 31 32  |8,10,16,10,20,12|
000017e0  2c 31 34 2c 31 32 2c 31  39 0d 0b ea 34 dc 20 31  |,14,12,19...4. 1|
000017f0  38 2c 32 2c 31 38 2c 34  2c 32 30 2c 31 30 2c 32  |8,2,18,4,20,10,2|
00001800  30 2c 31 39 2c 32 32 2c  38 2c 32 32 2c 32 30 2c  |0,19,22,8,22,20,|
00001810  2d 31 30 2c 31 2c 31 35  2c 31 37 2c 33 0d 0b f4  |-10,1,15,17,3...|
00001820  3d dc 20 32 2c 32 2c 31  32 2c 32 2c 31 36 2c 32  |=. 2,2,12,2,16,2|
00001830  2c 32 36 2c 32 2c 32 2c  34 2c 32 34 2c 34 2c 32  |,26,2,2,4,24,4,2|
00001840  2c 36 2c 31 36 2c 36 2c  31 38 2c 36 2c 32 32 2c  |,6,16,6,18,6,22,|
00001850  36 2c 34 2c 38 2c 31 34  2c 38 0d 0b fe 40 dc 20  |6,4,8,14,8...@. |
00001860  38 2c 31 30 2c 31 34 2c  31 30 2c 31 36 2c 31 30  |8,10,14,10,16,10|
00001870  2c 32 32 2c 31 30 2c 31  30 2c 31 32 2c 32 34 2c  |,22,10,10,12,24,|
00001880  31 32 2c 31 32 2c 31 34  2c 32 34 2c 31 34 2c 31  |12,12,14,24,14,1|
00001890  30 2c 31 36 2c 32 32 2c  31 36 0d 0c 08 3a dc 20  |0,16,22,16...:. |
000018a0  31 30 2c 31 38 2c 32 34  2c 31 38 2c 32 36 2c 31  |10,18,24,18,26,1|
000018b0  38 2c 32 38 2c 31 38 2c  31 30 2c 32 30 2c 33 30  |8,28,18,10,20,30|
000018c0  2c 32 30 2c 32 2c 32 2c  32 2c 34 2c 32 2c 36 2c  |,20,2,2,2,4,2,6,|
000018d0  32 2c 32 30 0d 0c 12 43  dc 20 34 2c 38 2c 34 2c  |2,20...C. 4,8,4,|
000018e0  32 30 2c 38 2c 31 30 2c  38 2c 32 30 2c 31 30 2c  |20,8,10,8,20,10,|
000018f0  31 36 2c 31 30 2c 31 38  2c 31 34 2c 31 2c 31 34  |16,10,18,14,1,14|
00001900  2c 34 2c 31 34 2c 38 2c  31 34 2c 31 30 2c 31 36  |,4,14,8,14,10,16|
00001910  2c 31 2c 31 36 2c 32 0d  0c 1c 47 dc 20 31 36 2c  |,1,16,2...G. 16,|
00001920  36 2c 31 36 2c 31 30 2c  31 38 2c 36 2c 31 38 2c  |6,16,10,18,6,18,|
00001930  31 30 2c 32 30 2c 37 2c  32 30 2c 38 2c 32 34 2c  |10,20,7,20,8,24,|
00001940  34 2c 32 34 2c 31 32 2c  32 34 2c 31 34 2c 32 34  |4,24,12,24,14,24|
00001950  2c 31 38 2c 32 36 2c 32  2c 32 36 2c 31 38 0d 0c  |,18,26,2,26,18..|
00001960  26 29 dc 20 32 38 2c 32  2c 32 38 2c 31 38 2c 33  |&). 28,2,28,18,3|
00001970  30 2c 31 2c 33 30 2c 32  30 2c 2d 31 30 2c 31 35  |0,1,30,20,-10,15|
00001980  2c 31 2c 33 2c 32 30 0d  0c 30 34 dc 20 31 2c 32  |,1,3,20..04. 1,2|
00001990  30 2c 38 2c 32 30 2c 32  2c 32 2c 31 32 2c 32 2c  |0,8,20,2,2,12,2,|
000019a0  31 36 2c 32 2c 32 36 2c  32 2c 32 2c 34 2c 32 34  |16,2,26,2,2,4,24|
000019b0  2c 34 2c 32 2c 36 2c 31  36 2c 36 0d 0c 3a 47 dc  |,4,2,6,16,6..:G.|
000019c0  20 31 38 2c 36 2c 32 32  2c 36 2c 34 2c 38 2c 31  | 18,6,22,6,4,8,1|
000019d0  34 2c 38 2c 38 2c 31 30  2c 31 34 2c 31 30 2c 31  |4,8,8,10,14,10,1|
000019e0  36 2c 31 30 2c 32 32 2c  31 30 2c 31 30 2c 31 32  |6,10,22,10,10,12|
000019f0  2c 32 34 2c 31 32 2c 31  30 2c 31 36 2c 32 33 2c  |,24,12,10,16,23,|
00001a00  31 36 0d 0c 44 3f dc 20  31 32 2c 31 34 2c 32 34  |16..D?. 12,14,24|
00001a10  2c 31 34 2c 32 2c 31 38  2c 38 2c 31 38 2c 31 30  |,14,2,18,8,18,10|
00001a20  2c 31 38 2c 32 34 2c 31  38 2c 32 36 2c 31 38 2c  |,18,24,18,26,18,|
00001a30  32 38 2c 31 38 2c 31 32  2c 32 30 2c 32 38 2c 32  |28,18,12,20,28,2|
00001a40  30 0d 0c 4e 44 dc 20 32  2c 32 2c 32 2c 34 2c 32  |0..ND. 2,2,2,4,2|
00001a50  2c 36 2c 32 2c 31 38 2c  34 2c 38 2c 34 2c 31 38  |,6,2,18,4,8,4,18|
00001a60  2c 38 2c 31 30 2c 38 2c  31 38 2c 31 30 2c 31 32  |,8,10,8,18,10,12|
00001a70  2c 31 30 2c 31 39 2c 31  34 2c 31 2c 31 34 2c 34  |,10,19,14,1,14,4|
00001a80  2c 31 34 2c 38 0d 0c 58  46 dc 20 31 34 2c 31 30  |,14,8..XF. 14,10|
00001a90  2c 31 36 2c 31 2c 31 36  2c 32 2c 31 36 2c 36 2c  |,16,1,16,2,16,6,|
00001aa0  31 36 2c 31 30 2c 31 38  2c 36 2c 31 38 2c 31 30  |16,10,18,6,18,10|
00001ab0  2c 32 34 2c 34 2c 32 34  2c 31 32 2c 32 36 2c 32  |,24,4,24,12,26,2|
00001ac0  2c 32 36 2c 31 38 2c 32  38 2c 32 0d 0c 62 24 dc  |,26,18,28,2..b$.|
00001ad0  20 32 38 2c 31 38 2c 33  30 2c 31 2c 33 30 2c 31  | 28,18,30,1,30,1|
00001ae0  39 2c 2d 31 30 2c 31 35  2c 31 2c 33 2c 31 37 0d  |9,-10,15,1,3,17.|
00001af0  0c 6c 45 dc 20 31 30 2c  32 2c 32 39 2c 32 2c 31  |.lE. 10,2,29,2,1|
00001b00  30 2c 34 2c 32 34 2c 34  2c 32 36 2c 36 2c 32 38  |0,4,24,4,26,6,28|
00001b10  2c 36 2c 31 32 2c 38 2c  31 38 2c 38 2c 31 36 2c  |,6,12,8,18,8,16,|
00001b20  31 32 2c 31 38 2c 31 32  2c 32 30 2c 31 32 2c 32  |12,18,12,20,12,2|
00001b30  38 2c 31 32 0d 0c 76 3e  dc 20 36 2c 31 34 2c 38  |8,12..v>. 6,14,8|
00001b40  2c 31 34 2c 31 36 2c 31  34 2c 32 38 2c 31 34 2c  |,14,16,14,28,14,|
00001b50  31 30 2c 31 36 2c 32 32  2c 31 36 2c 34 2c 31 39  |10,16,22,16,4,19|
00001b60  2c 31 34 2c 31 39 2c 31  36 2c 31 38 2c 32 36 2c  |,14,19,16,18,26,|
00001b70  31 38 0d 0c 80 45 dc 20  32 2c 31 2c 32 2c 31 30  |18...E. 2,1,2,10|
00001b80  2c 32 2c 31 32 2c 32 2c  31 39 2c 34 2c 31 2c 34  |,2,12,2,19,4,1,4|
00001b90  2c 31 39 2c 38 2c 32 2c  38 2c 31 30 2c 31 30 2c  |,19,8,2,8,10,10,|
00001ba0  36 2c 31 30 2c 31 36 2c  31 32 2c 38 2c 31 32 2c  |6,10,16,12,8,12,|
00001bb0  31 32 2c 31 38 2c 38 0d  0c 8a 2f dc 20 31 38 2c  |12,18,8.../. 18,|
00001bc0  31 32 2c 32 34 2c 34 2c  32 34 2c 31 30 2c 32 38  |12,24,4,24,10,28|
00001bd0  2c 36 2c 32 38 2c 31 38  2c 2d 31 30 2c 31 2c 31  |,6,28,18,-10,1,1|
00001be0  2c 31 34 2c 31 30 0d 0c  94 05 20 0d 0c 9e 0b dd  |,14,10.... .....|
00001bf0  a4 41 48 45 41 44 0d 0c  a8 0b ea 20 78 25 2c 79  |.AHEAD..... x%,y|
00001c00  25 0d 0c b2 27 78 25 3d  78 70 6f 73 25 2b a8 28  |%...'x%=xpos%+.(|
00001c10  64 69 72 65 63 74 69 6f  6e 25 28 64 69 72 25 2c  |direction%(dir%,|
00001c20  30 29 2f 31 30 29 2d 32  0d 0c bc 27 79 25 3d 79  |0)/10)-2...'y%=y|
00001c30  70 6f 73 25 2b 64 69 72  65 63 74 69 6f 6e 25 28  |pos%+direction%(|
00001c40  64 69 72 25 2c 30 29 20  83 20 31 30 20 2d 32 0d  |dir%,0) . 10 -2.|
00001c50  0c c6 4c e7 20 28 78 25  3c 31 29 84 28 79 25 3c  |..L. (x%<1).(y%<|
00001c60  31 29 84 28 78 25 3e 6d  61 78 78 25 29 84 28 79  |1).(x%>maxx%).(y|
00001c70  25 3e 6d 61 78 79 25 29  8c 20 3d bd 28 30 29 20  |%>maxy%). =.(0) |
00001c80  8b 20 3d bd 28 77 6f 72  6c 64 25 3f 28 28 78 25  |. =.(world%?((x%|
00001c90  2d 31 29 2a 32 30 2b 79  25 29 29 0d 0c d0 05 20  |-1)*20+y%)).... |
00001ca0  0d 0c da 0b dd a4 55 4e  44 45 52 0d 0c e4 23 3d  |......UNDER...#=|
00001cb0  bd 28 77 6f 72 6c 64 25  3f 28 28 78 70 6f 73 25  |.(world%?((xpos%|
00001cc0  2d 31 29 2a 32 30 2b 79  70 6f 73 25 29 29 0d 0c  |-1)*20+ypos%))..|
00001cd0  ee 05 20 0d 0c f8 0e dd  a4 46 49 4e 49 53 48 45  |.. ......FINISHE|
00001ce0  44 0d 0d 02 22 3d 28 28  78 70 6f 73 25 3d 78 66  |D..."=((xpos%=xf|
00001cf0  69 6e 25 29 80 28 79 70  6f 73 25 3d 79 66 69 6e  |in%).(ypos%=yfin|
00001d00  25 29 29 0d 0d 0c 05 20  0d 0d 16 10 dd a4 58 50  |%)).... ......XP|
00001d10  4f 53 3d 78 70 6f 73 25  0d 0d 20 05 20 0d 0d 2a  |OS=xpos%.. . ..*|
00001d20  10 dd a4 59 50 4f 53 3d  79 70 6f 73 25 0d 0d 34  |...YPOS=ypos%..4|
00001d30  05 20 0d 0d 3e 0d dd f2  4e 4f 45 52 52 4f 52 0d  |. ..>...NOERROR.|
00001d40  0d 48 0c 65 72 72 6f 72  25 3d a3 0d 0d 52 05 e1  |.H.error%=...R..|
00001d50  0d 0d 5c 05 20 0d 0d 66  11 dd f2 65 72 72 6f 72  |..\. ..f...error|
00001d60  28 6e 75 6d 25 29 0d 0d  70 09 f2 74 65 78 74 0d  |(num%)..p..text.|
00001d70  0d 7a 0c 65 72 72 6f 72  25 3d b9 0d 0d 84 27 e7  |.z.error%=....'.|
00001d80  20 6e 75 6d 25 3d 31 20  8c 20 f1 20 22 49 27 56  | num%=1 . . "I'V|
00001d90  45 20 48 49 54 20 41 20  4d 41 5a 45 20 57 41 4c  |E HIT A MAZE WAL|
00001da0  4c 22 0d 0d 8e 31 e7 20  6e 75 6d 25 3d 32 20 8c  |L"...1. num%=2 .|
00001db0  20 f1 20 22 49 20 43 41  4e 20 4e 4f 54 20 47 4f  | . "I CAN NOT GO|
00001dc0  20 46 4f 52 57 41 52 44  20 4c 49 4b 45 20 54 48  | FORWARD LIKE TH|
00001dd0  41 54 22 0d 0d 98 30 e7  20 6e 75 6d 25 3d 33 20  |AT"...0. num%=3 |
00001de0  8c 20 f1 20 22 49 20 43  41 4e 20 4e 4f 54 20 54  |. . "I CAN NOT T|
00001df0  55 52 4e 20 4c 45 46 54  20 4c 49 4b 45 20 54 48  |URN LEFT LIKE TH|
00001e00  41 54 22 0d 0d a2 31 e7  20 6e 75 6d 25 3d 34 20  |AT"...1. num%=4 |
00001e10  8c 20 f1 20 22 49 20 43  41 4e 20 4e 4f 54 20 54  |. . "I CAN NOT T|
00001e20  55 52 4e 20 52 49 47 48  54 20 4c 49 4b 45 20 54  |URN RIGHT LIKE T|
00001e30  48 41 54 22 0d 0d ac 31  e7 20 6e 75 6d 25 3d 35  |HAT"...1. num%=5|
00001e40  20 8c 20 f1 20 22 4f 4e  45 20 43 48 41 52 41 43  | . . "ONE CHARAC|
00001e50  54 45 52 20 4f 4e 4c 59  20 46 4f 52 20 41 20 50  |TER ONLY FOR A P|
00001e60  41 49 4e 54 22 0d 0d b6  32 e7 20 6e 75 6d 25 3d  |AINT"...2. num%=|
00001e70  36 20 8c 20 f1 20 22 4e  4f 4e 2d 50 52 49 4e 54  |6 . . "NON-PRINT|
00001e80  49 4e 47 20 50 41 49 4e  54 53 20 4e 4f 54 20 41  |ING PAINTS NOT A|
00001e90  4c 4c 4f 57 45 44 22 0d  0d c0 1f e7 20 6e 75 6d  |LLOWED"..... num|
00001ea0  25 3d 38 20 8c 20 f1 20  22 4e 4f 20 53 55 43 48  |%=8 . . "NO SUCH|
00001eb0  20 4d 41 5a 45 22 0d 0d  ca 31 e7 20 6e 75 6d 25  | MAZE"...1. num%|
00001ec0  3d 39 20 8c 20 f1 20 22  49 27 56 45 20 48 49 54  |=9 . . "I'VE HIT|
00001ed0  20 54 48 45 20 45 44 47  45 20 4f 46 20 54 48 45  | THE EDGE OF THE|
00001ee0  20 57 4f 52 4c 44 22 0d  0d d4 26 e7 20 6e 75 6d  | WORLD"...&. num|
00001ef0  25 3d 31 30 20 8c 20 f1  20 22 49 20 43 41 4e 27  |%=10 . . "I CAN'|
00001f00  54 20 4a 55 4d 50 20 54  48 45 52 45 22 0d 0d de  |T JUMP THERE"...|
00001f10  0e f2 4e 4f 45 52 52 4f  52 3a e0 0d 0d e8 05 e1  |..NOERROR:......|
00001f20  0d 0d f2 05 20 0d 0d fc  16 f4 20 53 68 6f 72 74  |.... ..... Short|
00001f30  2d 66 6f 72 6d 20 6e 61  6d 65 73 0d 0e 06 1b dd  |-form names.....|
00001f40  f2 46 44 28 58 25 29 3a  f2 46 4f 52 57 41 52 44  |.FD(X%):.FORWARD|
00001f50  28 58 25 29 3a e1 0d 0e  10 19 dd f2 52 54 28 58  |(X%):.......RT(X|
00001f60  25 29 3a f2 52 49 47 48  54 28 58 25 29 3a e1 0d  |%):.RIGHT(X%):..|
00001f70  0e 1a 18 dd f2 4c 54 28  58 25 29 3a f2 4c 45 46  |.....LT(X%):.LEF|
00001f80  54 28 58 25 29 3a e1 0d  0e 24 11 dd f2 50 55 3a  |T(X%):...$...PU:|
00001f90  f2 50 45 4e 55 50 3a e1  0d 0e 2e 13 dd f2 50 44  |.PENUP:.......PD|
00001fa0  3a f2 50 45 4e 44 4f 57  4e 3a e1 0d 0e 38 1f dd  |:.PENDOWN:...8..|
00001fb0  f2 43 50 28 58 24 29 3a  f2 43 48 41 4e 47 45 50  |.CP(X$):.CHANGEP|
00001fc0  41 49 4e 54 28 58 24 29  3a e1 0d 0e 42 17 dd f2  |AINT(X$):...B...|
00001fd0  43 53 3a f2 43 4c 45 41  52 53 43 52 45 45 4e 3a  |CS:.CLEARSCREEN:|
00001fe0  e1 0d 0e 4c 22 dd f2 44  52 28 58 25 2c 59 25 29  |...L"..DR(X%,Y%)|
00001ff0  3a 20 f2 44 52 41 57 54  4f 28 58 25 2c 59 25 29  |: .DRAWTO(X%,Y%)|
00002000  3a 20 e1 0d 0e 56 20 dd  f2 4a 50 28 58 25 2c 59  |: ...V ..JP(X%,Y|
00002010  25 29 3a f2 4a 55 4d 50  54 4f 28 58 25 2c 59 25  |%):.JUMPTO(X%,Y%|
00002020  29 3a e1 0d 0e 60 1b dd  f2 47 4d 28 58 25 29 3a  |):...`...GM(X%):|
00002030  f2 47 45 54 4d 41 5a 45  28 58 25 29 3a e1 0d 0e  |.GETMAZE(X%):...|
00002040  6a 0f dd a4 41 48 3d a4  41 48 45 41 44 0d 0e 74  |j...AH=.AHEAD..t|
00002050  0f dd a4 55 4e 3d a4 55  4e 44 45 52 0d 0e 7e 15  |...UN=.UNDER..~.|
00002060  dd a4 48 45 41 44 49 4e  47 3d 64 69 72 25 2a 34  |..HEADING=dir%*4|
00002070  35 0d 0e 88 10 dd a4 48  45 3d 64 69 72 25 2a 34  |5......HE=dir%*4|
00002080  35 0d 0e 92 10 dd a4 58  53 3d a4 58 53 54 41 52  |5......XS=.XSTAR|
00002090  54 0d 0e 9c 11 dd a4 58  46 3d a4 58 46 49 4e 49  |T......XF=.XFINI|
000020a0  53 48 0d 0e a6 10 dd a4  59 53 3d a4 59 53 54 41  |SH......YS=.YSTA|
000020b0  52 54 0d 0e b0 11 dd a4  59 46 3d a4 59 46 49 4e  |RT......YF=.YFIN|
000020c0  49 53 48 0d 0e ba 0e dd  a4 58 50 3d a4 58 50 4f  |ISH......XP=.XPO|
000020d0  53 0d 0e c4 0e dd a4 59  50 3d a4 59 50 4f 53 0d  |S......YP=.YPOS.|
000020e0  0e ce 13 dd a4 46 49 4e  3d a4 46 49 4e 49 53 48  |.....FIN=.FINISH|
000020f0  45 44 0d 0e d8 05 20 0d  0e e2 20 f4 20 54 68 65  |ED.... ... . The|
00002100  20 6d 61 7a 65 20 73 6f  6c 76 69 6e 67 20 72 6f  | maze solving ro|
00002110  75 74 69 6e 65 73 2e 0d  0e ec 05 20 0d 0e f6 0a  |utines..... ....|
00002120  dd a4 77 61 6c 6c 0d 0f  00 1e 3d 28 28 a4 41 48  |..wall....=((.AH|
00002130  3d bd 28 30 29 29 84 28  a4 41 48 3d bd 28 32 34  |=.(0)).(.AH=.(24|
00002140  30 29 29 29 0d 0f 0a 05  20 0d 0f 14 0e dd a4 6c  |0))).... ......l|
00002150  65 66 74 77 61 6c 6c 0d  0f 1e 08 ea 20 68 25 0d  |eftwall..... h%.|
00002160  0f 28 0b f2 4c 54 28 39  30 29 0d 0f 32 0c 68 25  |.(..LT(90)..2.h%|
00002170  3d a4 77 61 6c 6c 0d 0f  3c 0b f2 52 54 28 39 30  |=.wall..<..RT(90|
00002180  29 0d 0f 46 07 3d 68 25  0d 0f 50 05 20 0d 0f 5a  |)..F.=h%..P. ..Z|
00002190  0f dd a4 72 69 67 68 74  77 61 6c 6c 0d 0f 64 08  |...rightwall..d.|
000021a0  ea 20 68 25 0d 0f 6e 0b  f2 52 54 28 39 30 29 0d  |. h%..n..RT(90).|
000021b0  0f 78 0c 68 25 3d a4 77  61 6c 6c 0d 0f 82 0b f2  |.x.h%=.wall.....|
000021c0  4c 54 28 39 30 29 0d 0f  8c 07 3d 68 25 0d 0f 96  |LT(90)....=h%...|
000021d0  05 20 0d 0f a0 0d dd a4  64 65 61 64 65 6e 64 0d  |. ......deadend.|
000021e0  0f aa 0c ea 20 68 25 2c  20 69 25 0d 0f b4 08 68  |.... h%, i%....h|
000021f0  25 3d 30 0d 0f be 0b f2  4c 54 28 39 30 29 0d 0f  |%=0.....LT(90)..|
00002200  c8 0e e3 20 69 25 3d 31  20 b8 20 33 0d 0f d2 15  |... i%=1 . 3....|
00002210  e7 20 a4 77 61 6c 6c 20  8c 20 68 25 3d 68 25 2b  |. .wall . h%=h%+|
00002220  31 0d 0f dc 0b f2 52 54  28 39 30 29 0d 0f e6 05  |1.....RT(90)....|
00002230  ed 0d 0f f0 0b f2 4c 54  28 39 30 29 0d 0f fa 0b  |......LT(90)....|
00002240  3d 28 68 25 3d 33 29 0d  10 04 05 20 0d 10 0e 0d  |=(h%=3).... ....|
00002250  dd f2 68 75 67 6c 65 66  74 0d 10 18 24 e7 20 ac  |..hugleft...$. .|
00002260  20 a4 6c 65 66 74 77 61  6c 6c 20 8c 20 f2 4c 54  | .leftwall . .LT|
00002270  28 39 30 29 3a f2 46 44  28 31 29 3a e1 0d 10 22  |(90):.FD(1):..."|
00002280  2f e7 20 28 a4 77 61 6c  6c 20 80 20 ac 20 a4 72  |/. (.wall . . .r|
00002290  69 67 68 74 77 61 6c 6c  29 20 8c 20 f2 52 54 28  |ightwall) . .RT(|
000022a0  39 30 29 3a f2 46 44 28  31 29 3a e1 0d 10 2c 18  |90):.FD(1):...,.|
000022b0  e7 20 ac 20 a4 77 61 6c  6c 20 8c 20 f2 46 44 28  |. . .wall . .FD(|
000022c0  31 29 3a e1 0d 10 36 13  f2 52 54 28 31 38 30 29  |1):...6..RT(180)|
000022d0  3a f2 46 44 28 31 29 0d  10 40 05 e1 0d 10 4a 05  |:.FD(1)..@....J.|
000022e0  20 0d 10 54 10 dd f2 54  52 59 48 55 47 4c 45 46  | ..T...TRYHUGLEF|
000022f0  54 0d 10 5e 05 f5 0d 10  68 0c f2 68 75 67 6c 65  |T..^....h..hugle|
00002300  66 74 0d 10 72 0a fd 20  a4 46 49 4e 0d 10 7c 05  |ft..r.. .FIN..|.|
00002310  e1 0d 10 86 05 20 0d 10  90 0e dd f2 68 75 67 72  |..... ......hugr|
00002320  69 67 68 74 0d 10 9a 25  e7 20 ac 20 a4 72 69 67  |ight...%. . .rig|
00002330  68 74 77 61 6c 6c 20 8c  20 f2 52 54 28 39 30 29  |htwall . .RT(90)|
00002340  3a f2 46 44 28 31 29 3a  e1 0d 10 a4 2e e7 20 28  |:.FD(1):...... (|
00002350  a4 77 61 6c 6c 20 80 20  ac 20 a4 6c 65 66 74 77  |.wall . . .leftw|
00002360  61 6c 6c 29 20 8c 20 f2  4c 54 28 39 30 29 3a f2  |all) . .LT(90):.|
00002370  46 44 28 31 29 3a e1 0d  10 ae 18 e7 20 ac 20 a4  |FD(1):...... . .|
00002380  77 61 6c 6c 20 8c 20 f2  46 44 28 31 29 3a e1 0d  |wall . .FD(1):..|
00002390  10 b8 13 f2 52 54 28 31  38 30 29 3a f2 46 44 28  |....RT(180):.FD(|
000023a0  31 29 0d 10 c2 05 e1 0d  10 cc 05 20 0d 10 d6 11  |1)......... ....|
000023b0  dd f2 54 52 59 48 55 47  52 49 47 48 54 0d 10 e0  |..TRYHUGRIGHT...|
000023c0  05 f5 0d 10 ea 0d f2 68  75 67 72 69 67 68 74 0d  |.......hugright.|
000023d0  10 f4 0a fd 20 a4 46 49  4e 0d 10 fe 05 e1 0d 11  |.... .FIN.......|
000023e0  08 05 20 0d 11 12 0d dd  f2 54 52 59 28 4e 25 29  |.. ......TRY(N%)|
000023f0  0d 11 1c 0b f2 47 4d 28  4e 25 29 0d 11 26 0c f2  |.....GM(N%)..&..|
00002400  43 50 28 22 40 22 29 0d  11 30 19 f1 22 4c 65 66  |CP("@")..0.."Lef|
00002410  74 20 77 61 6c 6c 20 68  75 67 67 69 6e 67 2e 22  |t wall hugging."|
00002420  0d 11 3a 0f f2 54 52 59  48 55 47 4c 45 46 54 0d  |..:..TRYHUGLEFT.|
00002430  11 44 10 f2 4a 50 28 a4  58 53 2c a4 59 53 29 0d  |.D..JP(.XS,.YS).|
00002440  11 4e 0c f2 43 50 28 22  23 22 29 0d 11 58 1a f1  |.N..CP("#")..X..|
00002450  22 52 69 67 68 74 20 77  61 6c 6c 20 68 75 67 67  |"Right wall hugg|
00002460  69 6e 67 2e 22 0d 11 62  10 f2 54 52 59 48 55 47  |ing."..b..TRYHUG|
00002470  52 49 47 48 54 0d 11 6c  05 e1 0d ff              |RIGHT..l....|
0000247c
SOLVER.m0
SOLVER.m1
SOLVER.m2
SOLVER.m4
SOLVER.m5