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

TURTLE

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: TURTLE
Read OK:
File size: 1792 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, optimised for space.
   30REM Stephen Goudge, October 1982
   40 
   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 cnt%
  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 
 2500DEFFNAHEAD
 2510LOCAL x%,y%
 2520x%=xpos%+INT(direction%(dir%,0)/10)-2
 2530y%=ypos%+direction%(dir%,0) MOD 10 -2
 2540IF (x%<1)OR(y%<1)OR(x%>maxx%)OR(y%>maxy%)THEN =CHR$(0) ELSE =CHR$(world%?((x%-1)*20+y%))
 2550 
 2560DEFFNUNDER
 2570=CHR$(world%?((xpos%-1)*20+ypos%))
 2580 
 2590DEFFNXPOS=xpos%
 2600 
 2610DEFFNYPOS=ypos%
 2620 
 2630DEFPROCNOERROR
 2640error%=FALSE
 2650ENDPROC
 2660 
 2670DEFPROCerror(num%)
 2680PROCtext
 2690 error%=TRUE
 2700IF num%=1 THEN PRINT "I'VE HIT A MAZE WALL"
 2710IF num%=2 THEN PRINT "I CAN NOT GO FORWARD LIKE THAT"
 2720IF num%=3 THEN PRINT "I CAN NOT TURN LEFT LIKE THAT"
 2730IF num%=4 THEN PRINT "I CAN NOT TURN RIGHT LIKE THAT"
 2740IF num%=5 THEN PRINT "ONE CHARACTER ONLY FOR A PAINT"
 2750IF num%=6 THEN PRINT "NON-PRINTING PAINTS NOT ALLOWED"
 2760IF num%=8 THEN PRINT "NO SUCH MAZE"
 2770IF num%=9 THEN PRINT "I'VE HIT THE EDGE OF THE WORLD"
 2780IF num%=10 THEN PRINT "I CAN'T JUMP THERE"
 2790PROCNOERROR:END
 2800ENDPROC
 2810 
 2820REM Short-form names
 2830DEFPROCFD(X%):PROCFORWARD(X%):ENDPROC
 2840DEFPROCRT(X%):PROCRIGHT(X%):ENDPROC
 2850DEFPROCLT(X%):PROCLEFT(X%):ENDPROC
 2860DEFPROCPU:PROCPENUP:ENDPROC
 2870DEFPROCPD:PROCPENDOWN:ENDPROC
 2880DEFPROCCP(X$):PROCCHANGEPAINT(X$):ENDPROC
 2890DEFPROCCS:PROCCLEARSCREEN:ENDPROC
 2900DEFPROCDR(X%,Y%): PROCDRAWTO(X%,Y%): ENDPROC
 2910DEFPROCJP(X%,Y%):PROCJUMPTO(X%,Y%):ENDPROC
 2920DEFFNHEADING=dir%*45
 2930DEFFNHE=dir%*45
 2940DEFFNAH=FNAHEAD
 2950DEFFNUN=FNUNDER
 2960DEFFNXP=FNXPOS
 2970DEFFNYP=FNYPOS

� M-TEXTURT
+� Model B version, 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);
�
� cnt%
� 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
	��
	� 
	�ݤ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%))
 
ݤXPOS=xpos%
( 
2ݤYPOS=ypos%
< 
F
��NOERROR
Perror%=�
Z�
d 
n��error(num%)
x	�text
�
 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:�
6��PD:�PENDOWN:�
@��CP(X$):�CHANGEPAINT(X$):�
J��CS:�CLEARSCREEN:�
T"��DR(X%,Y%): �DRAWTO(X%,Y%): �
^ ��JP(X%,Y%):�JUMPTO(X%,Y%):�
hݤHEADING=dir%*45
rݤHE=dir%*45
|ݤAH=�AHEAD
�ݤUN=�UNDER
�ݤXP=�XPOS
�ݤYP=�YPOS
�
00000000  0d 00 0a 0f f4 20 4d 2d  54 45 58 54 55 52 54 0d  |..... M-TEXTURT.|
00000010  00 14 2b f4 20 4d 6f 64  65 6c 20 42 20 76 65 72  |..+. Model B ver|
00000020  73 69 6f 6e 2c 20 6f 70  74 69 6d 69 73 65 64 20  |sion, optimised |
00000030  66 6f 72 20 73 70 61 63  65 2e 0d 00 1e 22 f4 20  |for space....". |
00000040  53 74 65 70 68 65 6e 20  47 6f 75 64 67 65 2c 20  |Stephen Goudge, |
00000050  4f 63 74 6f 62 65 72 20  31 39 38 32 0d 00 28 05  |October 1982..(.|
00000060  20 0d 00 32 2c de 20 64  69 72 65 63 74 69 6f 6e  | ..2,. direction|
00000070  25 28 37 2c 32 29 2c 64  69 72 6e 61 6d 65 24 28  |%(7,2),dirname$(|
00000080  37 29 2c 77 6f 72 6c 64  25 20 36 30 30 0d 00 3c  |7),world% 600..<|
00000090  07 eb 20 34 0d 00 46 0f  f2 69 6e 69 74 69 61 6c  |.. 4..F..initial|
000000a0  69 73 65 0d 00 50 0a f2  73 65 74 75 70 0d 00 5a  |ise..P..setup..Z|
000000b0  05 e0 0d 00 64 05 20 0d  00 6e 05 20 0d 00 78 10  |....d. ..n. ..x.|
000000c0  dd f2 69 6e 69 74 69 61  6c 69 73 65 0d 00 82 0f  |..initialise....|
000000d0  ea 20 63 6e 73 25 2c 63  6e 74 25 0d 00 8c 1b f4  |. cns%,cnt%.....|
000000e0  20 43 68 61 72 61 63 74  65 72 20 64 65 66 69 6e  | Character defin|
000000f0  69 74 69 6f 6e 73 0d 00  96 26 ef 20 32 33 2c 32  |itions...&. 23,2|
00000100  32 34 2c 31 36 2c 35 36  2c 38 34 2c 31 34 36 2c  |24,16,56,84,146,|
00000110  31 34 36 2c 31 36 2c 31  36 2c 31 36 0d 00 a0 26  |146,16,16,16...&|
00000120  ef 20 32 33 2c 32 32 35  2c 31 36 2c 31 36 2c 31  |. 23,225,16,16,1|
00000130  36 2c 31 34 36 2c 31 34  36 2c 38 34 2c 35 36 2c  |6,146,146,84,56,|
00000140  31 36 0d 00 aa 24 ef 20  32 33 2c 32 32 36 2c 32  |16...$. 23,226,2|
00000150  34 2c 33 32 2c 36 34 2c  32 35 35 2c 36 34 2c 33  |4,32,64,255,64,3|
00000160  32 2c 32 34 2c 30 0d 00  b4 20 ef 20 32 33 2c 32  |2,24,0... . 23,2|
00000170  32 37 2c 32 34 2c 34 2c  32 2c 32 35 35 2c 32 2c  |27,24,4,2,255,2,|
00000180  34 2c 32 34 2c 30 0d 00  be 28 ef 20 32 33 2c 32  |4,24,0...(. 23,2|
00000190  32 38 2c 32 35 32 2c 31  39 32 2c 31 36 30 2c 31  |28,252,192,160,1|
000001a0  34 34 2c 31 33 36 2c 31  33 32 2c 32 2c 31 0d 00  |44,136,132,2,1..|
000001b0  c8 22 ef 20 32 33 2c 32  32 39 2c 31 32 38 2c 36  |.". 23,229,128,6|
000001c0  34 2c 33 33 2c 31 37 2c  39 2c 35 2c 33 2c 36 33  |4,33,17,9,5,3,63|
000001d0  0d 00 d2 22 ef 20 32 33  2c 32 33 30 2c 36 33 2c  |...". 23,230,63,|
000001e0  33 2c 35 2c 39 2c 31 37  2c 33 33 2c 36 34 2c 31  |3,5,9,17,33,64,1|
000001f0  32 38 0d 00 dc 28 ef 20  32 33 2c 32 33 31 2c 31  |28...(. 23,231,1|
00000200  2c 32 2c 31 33 32 2c 31  33 36 2c 31 34 34 2c 31  |,2,132,136,144,1|
00000210  36 30 2c 31 39 32 2c 32  35 32 0d 00 e6 26 ef 20  |60,192,252...&. |
00000220  32 33 2c 32 33 32 2c 32  34 2c 36 30 2c 31 32 36  |23,232,24,60,126|
00000230  2c 32 35 35 2c 32 34 2c  32 34 2c 32 34 2c 32 34  |,255,24,24,24,24|
00000240  0d 00 f0 26 ef 20 32 33  2c 32 33 33 2c 32 34 2c  |...&. 23,233,24,|
00000250  32 34 2c 32 34 2c 32 34  2c 32 35 35 2c 31 32 36  |24,24,24,255,126|
00000260  2c 36 30 2c 32 34 0d 00  fa 28 ef 20 32 33 2c 32  |,60,24...(. 23,2|
00000270  33 34 2c 31 36 2c 34 38  2c 31 31 32 2c 32 35 35  |34,16,48,112,255|
00000280  2c 32 35 35 2c 31 31 32  2c 34 38 2c 31 36 0d 01  |,255,112,48,16..|
00000290  04 24 ef 20 32 33 2c 32  33 35 2c 38 2c 31 32 2c  |.$. 23,235,8,12,|
000002a0  31 34 2c 32 35 35 2c 32  35 35 2c 31 34 2c 31 32  |14,255,255,14,12|
000002b0  2c 38 0d 01 0e 28 ef 20  32 33 2c 32 33 36 2c 31  |,8...(. 23,236,1|
000002c0  32 34 2c 32 34 38 2c 32  34 30 2c 32 34 38 2c 32  |24,248,240,248,2|
000002d0  30 34 2c 31 33 34 2c 33  2c 31 0d 01 18 26 ef 20  |04,134,3,1...&. |
000002e0  32 33 2c 32 33 37 2c 31  32 38 2c 31 39 32 2c 39  |23,237,128,192,9|
000002f0  37 2c 35 31 2c 33 31 2c  31 35 2c 33 31 2c 36 32  |7,51,31,15,31,62|
00000300  0d 01 22 26 ef 20 32 33  2c 32 33 38 2c 36 32 2c  |.."&. 23,238,62,|
00000310  33 31 2c 31 35 2c 33 31  2c 35 31 2c 39 37 2c 31  |31,15,31,51,97,1|
00000320  39 32 2c 31 32 38 0d 01  2c 28 ef 20 32 33 2c 32  |92,128..,(. 23,2|
00000330  33 39 2c 31 2c 33 2c 31  33 34 2c 32 30 34 2c 32  |39,1,3,134,204,2|
00000340  34 38 2c 32 34 30 2c 32  34 38 2c 31 32 34 0d 01  |48,240,248,124..|
00000350  36 2c ef 20 32 33 2c 32  34 30 2c 32 35 35 2c 32  |6,. 23,240,255,2|
00000360  35 35 2c 32 35 35 2c 32  35 35 2c 32 35 35 2c 32  |55,255,255,255,2|
00000370  35 35 2c 32 35 35 2c 32  35 35 0d 01 4a 1a 78 6f  |55,255,255..J.xo|
00000380  66 66 73 65 74 25 3d 30  3a 79 6f 66 66 73 65 74  |ffset%=0:yoffset|
00000390  25 3d 32 31 0d 01 54 15  6d 61 78 78 25 3d 33 30  |%=21..T.maxx%=30|
000003a0  3a 6d 61 78 79 25 3d 32  30 0d 01 5e 25 78 6d 61  |:maxy%=20..^%xma|
000003b0  78 25 3d 33 33 3a 78 6d  69 6e 25 3d 32 3a 79 6d  |x%=33:xmin%=2:ym|
000003c0  61 78 25 3d 32 34 3a 79  6d 69 6e 25 3d 33 0d 01  |ax%=24:ymin%=3..|
000003d0  68 10 e3 20 63 6e 74 25  3d 30 20 b8 20 37 0d 01  |h.. cnt%=0 . 7..|
000003e0  72 3e f3 20 64 69 72 65  63 74 69 6f 6e 25 28 63  |r>. direction%(c|
000003f0  6e 74 25 2c 30 29 2c 64  69 72 65 63 74 69 6f 6e  |nt%,0),direction|
00000400  25 28 63 6e 74 25 2c 31  29 2c 64 69 72 65 63 74  |%(cnt%,1),direct|
00000410  69 6f 6e 25 28 63 6e 74  25 2c 32 29 0d 01 7c 14  |ion%(cnt%,2)..|.|
00000420  f3 20 64 69 72 6e 61 6d  65 24 28 63 6e 74 25 29  |. dirname$(cnt%)|
00000430  0d 01 86 0a ed 20 63 6e  74 25 0d 01 90 05 e1 0d  |..... cnt%......|
00000440  01 9a 05 20 0d 01 a4 1d  dc 20 32 33 2c 32 32 34  |... ..... 23,224|
00000450  2c 32 33 32 2c 22 4e 6f  72 74 68 20 20 20 20 20  |,232,"North     |
00000460  22 0d 01 ae 1d dc 20 33  33 2c 32 33 30 2c 32 33  |"..... 33,230,23|
00000470  38 2c 22 4e 6f 72 74 68  20 45 61 73 74 22 0d 01  |8,"North East"..|
00000480  b8 1d dc 20 33 32 2c 32  32 37 2c 32 33 35 2c 22  |... 32,227,235,"|
00000490  45 61 73 74 20 20 20 20  20 20 22 0d 01 c2 1d dc  |East      ".....|
000004a0  20 33 31 2c 32 32 39 2c  32 33 37 2c 22 53 6f 75  | 31,229,237,"Sou|
000004b0  74 68 20 45 61 73 74 22  0d 01 cc 1d dc 20 32 31  |th East"..... 21|
000004c0  2c 32 32 35 2c 32 33 33  2c 22 53 6f 75 74 68 20  |,225,233,"South |
000004d0  20 20 20 20 22 0d 01 d6  1d dc 20 31 31 2c 32 33  |    "..... 11,23|
000004e0  31 2c 32 33 39 2c 22 53  6f 75 74 68 20 57 65 73  |1,239,"South Wes|
000004f0  74 22 0d 01 e0 1d dc 20  31 32 2c 32 32 36 2c 32  |t"..... 12,226,2|
00000500  33 34 2c 22 57 65 73 74  20 20 20 20 20 20 22 0d  |34,"West      ".|
00000510  01 ea 1d dc 20 31 33 2c  32 32 38 2c 32 33 36 2c  |.... 13,228,236,|
00000520  22 4e 6f 72 74 68 20 57  65 73 74 22 0d 01 f4 05  |"North West"....|
00000530  20 0d 01 fe 0b dd f2 73  65 74 75 70 0d 02 08 0a  | ......setup....|
00000540  ea 20 63 6e 74 25 0d 02  12 0c ec 20 34 30 2c 39  |. cnt%..... 40,9|
00000550  34 38 0d 02 1c 19 df 20  31 31 30 34 2c 39 34 38  |48..... 1104,948|
00000560  3a df 20 31 31 30 34 2c  32 30 30 0d 02 26 15 df  |:. 1104,200..&..|
00000570  20 34 30 2c 32 30 30 3a  df 20 34 30 2c 39 34 38  | 40,200:. 40,948|
00000580  0d 02 30 0c ec 20 38 38  2c 39 30 34 0d 02 3a 19  |..0.. 88,904..:.|
00000590  df 20 31 30 35 36 2c 39  30 34 3a df 20 31 30 35  |. 1056,904:. 105|
000005a0  36 2c 32 34 38 0d 02 44  15 df 20 38 38 2c 32 34  |6,248..D.. 88,24|
000005b0  38 3a df 20 38 38 2c 39  30 34 0d 02 4e 0c df 20  |8:. 88,904..N.. |
000005c0  34 30 2c 39 34 38 0d 02  58 19 ec 20 31 30 35 36  |40,948..X.. 1056|
000005d0  2c 39 30 34 3a df 20 31  31 30 34 2c 39 34 38 0d  |,904:. 1104,948.|
000005e0  02 62 19 ec 20 31 30 35  36 2c 32 34 38 3a df 20  |.b.. 1056,248:. |
000005f0  31 31 30 34 2c 32 30 30  0d 02 6c 15 ec 20 38 38  |1104,200..l.. 88|
00000600  2c 32 34 38 3a df 20 34  30 2c 32 30 30 0d 02 76  |,248:. 40,200..v|
00000610  07 ef 20 35 0d 02 80 1c  f4 20 44 72 61 77 20 69  |.. 5..... Draw i|
00000620  6e 20 6e 75 6d 65 72 69  63 20 73 63 61 6c 65 2e  |n numeric scale.|
00000630  0d 02 8a 0c ec 20 39 36  2c 39 34 30 0d 02 94 25  |..... 96,940...%|
00000640  e3 20 63 6e 74 25 3d 31  20 b8 20 33 30 3a f1 3b  |. cnt%=1 . 30:.;|
00000650  63 6e 74 25 20 83 20 31  30 3b 3a ed 20 63 6e 74  |cnt% . 10;:. cnt|
00000660  25 0d 02 9e 0c ec 20 39  36 2c 32 34 30 0d 02 a8  |%..... 96,240...|
00000670  25 e3 20 63 6e 74 25 3d  31 20 b8 20 33 30 3a f1  |%. cnt%=1 . 30:.|
00000680  3b 63 6e 74 25 20 83 20  31 30 3b 3a ed 20 63 6e  |;cnt% . 10;:. cn|
00000690  74 25 0d 02 b2 0c ec 20  34 38 2c 32 38 30 0d 02  |t%..... 48,280..|
000006a0  bc 11 e3 20 63 6e 74 25  3d 31 20 b8 20 32 30 0d  |... cnt%=1 . 20.|
000006b0  02 c6 1b f1 3b 63 6e 74  25 20 83 20 31 30 3b bd  |....;cnt% . 10;.|
000006c0  28 38 29 3b bd 28 31 31  29 3b 0d 02 d0 0a ed 20  |(8);.(11);..... |
000006d0  63 6e 74 25 0d 02 da 0e  ec 20 31 30 36 34 2c 32  |cnt%..... 1064,2|
000006e0  38 30 0d 02 e4 11 e3 20  63 6e 74 25 3d 31 20 b8  |80..... cnt%=1 .|
000006f0  20 32 30 0d 02 ee 1b f1  3b 63 6e 74 25 20 83 20  | 20.....;cnt% . |
00000700  31 30 3b bd 28 38 29 3b  bd 28 31 31 29 3b 0d 02  |10;.(8);.(11);..|
00000710  f8 0a ed 20 63 6e 74 25  0d 03 02 07 ef 20 34 0d  |... cnt%..... 4.|
00000720  03 0c 34 f1 8a 30 2c 32  36 29 3b 22 44 69 72 3a  |..4..0,26);"Dir:|
00000730  20 20 20 20 20 20 20 20  20 20 20 50 6f 73 3a 20  |           Pos: |
00000740  20 20 20 20 20 20 20 50  61 69 6e 74 3a 27 20 27  |       Paint:' '|
00000750  2e 22 3b 0d 03 16 10 f2  43 4c 45 41 52 53 43 52  |.";.....CLEARSCR|
00000760  45 45 4e 0d 03 20 05 e1  0d 03 2a 05 20 0d 03 34  |EEN.. ....*. ..4|
00000770  11 dd f2 43 4c 45 41 52  53 43 52 45 45 4e 0d 03  |...CLEARSCREEN..|
00000780  3e 0a ea 20 63 6e 74 25  0d 03 48 0c f2 4e 4f 45  |>.. cnt%..H..NOE|
00000790  52 52 4f 52 0d 03 52 1a  64 69 72 25 3d 30 3a 78  |RROR..R.dir%=0:x|
000007a0  70 6f 73 25 3d 31 3a 79  70 6f 73 25 3d 31 0d 03  |pos%=1:ypos%=1..|
000007b0  5c 2b 78 73 74 61 72 74  25 3d 2d 31 3a 79 73 74  |\+xstart%=-1:yst|
000007c0  61 72 74 25 3d 2d 31 3a  78 66 69 6e 25 3d 2d 31  |art%=-1:xfin%=-1|
000007d0  3a 79 66 69 6e 25 3d 2d  31 0d 03 66 15 70 65 6e  |:yfin%=-1..f.pen|
000007e0  25 3d 32 3a 70 61 69 6e  74 24 3d 22 2a 22 0d 03  |%=2:paint$="*"..|
000007f0  70 12 e3 20 63 6e 74 25  3d 30 20 b8 20 36 30 30  |p.. cnt%=0 . 600|
00000800  0d 03 7a 12 77 6f 72 6c  64 25 3f 63 6e 74 25 3d  |..z.world%?cnt%=|
00000810  33 32 0d 03 84 0a ed 20  63 6e 74 25 0d 03 8e 15  |32..... cnt%....|
00000820  78 74 65 78 74 25 3d b1  3a 79 74 65 78 74 25 3d  |xtext%=.:ytext%=|
00000830  bc 0d 03 98 28 ef 20 32  38 2c 78 6d 69 6e 25 2b  |....(. 28,xmin%+|
00000840  31 2c 79 6d 61 78 25 2d  31 2c 78 6d 61 78 25 2d  |1,ymax%-1,xmax%-|
00000850  31 2c 79 6d 69 6e 25 2b  31 0d 03 a2 05 db 0d 03  |1,ymin%+1.......|
00000860  ac 0f f2 77 72 69 74 65  70 61 69 6e 74 0d 03 b6  |...writepaint...|
00000870  10 f2 77 72 69 74 65 74  75 72 74 6c 65 0d 03 c0  |..writeturtle...|
00000880  0d f2 77 72 69 74 65 64  69 72 0d 03 ca 0d f2 77  |..writedir.....w|
00000890  72 69 74 65 70 6f 73 0d  03 d4 05 db 0d 03 de 05  |ritepos.........|
000008a0  e1 0d 03 e8 05 20 0d 03  f2 0a dd f2 74 65 78 74  |..... ......text|
000008b0  0d 03 fc 13 ef 20 32 38  2c 30 2c 33 30 2c 33 39  |..... 28,0,30,39|
000008c0  2c 32 37 0d 04 06 15 f1  8a 78 74 65 78 74 25 2c  |,27......xtext%,|
000008d0  79 74 65 78 74 25 29 3b  0d 04 10 05 e1 0d 04 1a  |ytext%);........|
000008e0  05 20 0d 04 24 0a dd f2  64 61 74 61 0d 04 2e 0c  |. ..$...data....|
000008f0  78 74 65 78 74 25 3d b1  0d 04 38 0c 79 74 65 78  |xtext%=...8.ytex|
00000900  74 25 3d bc 0d 04 42 13  ef 20 32 38 2c 30 2c 32  |t%=...B.. 28,0,2|
00000910  36 2c 33 39 2c 32 36 0d  04 4c 05 e1 0d 04 56 05  |6,39,26..L....V.|
00000920  20 0d 04 60 0a dd f2 70  6c 61 79 0d 04 6a 0c 78  | ..`...play..j.x|
00000930  74 65 78 74 25 3d b1 0d  04 74 0c 79 74 65 78 74  |text%=...t.ytext|
00000940  25 3d bc 0d 04 7e 20 ef  20 32 38 2c 78 6d 69 6e  |%=...~ . 28,xmin|
00000950  25 2c 79 6d 61 78 25 2c  78 6d 61 78 25 2c 79 6d  |%,ymax%,xmax%,ym|
00000960  69 6e 25 0d 04 88 05 e1  0d 04 92 05 20 0d 04 9c  |in%......... ...|
00000970  0e dd f2 77 72 69 74 65  64 69 72 0d 04 a6 09 f2  |...writedir.....|
00000980  64 61 74 61 0d 04 b0 1a  f1 8a 34 2c 30 29 3b 64  |data......4,0);d|
00000990  69 72 6e 61 6d 65 24 28  64 69 72 25 29 3b 0d 04  |irname$(dir%);..|
000009a0  ba 09 f2 74 65 78 74 0d  04 c4 05 e1 0d 04 ce 05  |...text.........|
000009b0  20 0d 04 d8 0e dd f2 77  72 69 74 65 70 6f 73 0d  | ......writepos.|
000009c0  04 e2 09 f2 64 61 74 61  0d 04 ec 16 f1 8a 31 39  |....data......19|
000009d0  2c 30 29 3b 22 20 20 20  20 20 20 20 22 3b 0d 04  |,0);"       ";..|
000009e0  f6 24 f1 8a 31 39 2c 30  29 3b 22 28 22 3b 78 70  |.$..19,0);"(";xp|
000009f0  6f 73 25 3b 22 2c 22 3b  79 70 6f 73 25 3b 22 29  |os%;",";ypos%;")|
00000a00  22 3b 0d 05 00 09 f2 74  65 78 74 0d 05 0a 05 e1  |";.....text.....|
00000a10  0d 05 14 05 20 0d 05 1e  11 dd f2 77 72 69 74 65  |.... ......write|
00000a20  74 75 72 74 6c 65 0d 05  28 09 f2 70 6c 61 79 0d  |turtle..(..play.|
00000a30  05 32 3e f1 8a 78 6f 66  66 73 65 74 25 2b 78 70  |.2>..xoffset%+xp|
00000a40  6f 73 25 2c 79 6f 66 66  73 65 74 25 2d 79 70 6f  |os%,yoffset%-ypo|
00000a50  73 25 29 3b bd 28 64 69  72 65 63 74 69 6f 6e 25  |s%);.(direction%|
00000a60  28 64 69 72 25 2c 70 65  6e 25 29 29 3b 0d 05 3c  |(dir%,pen%));..<|
00000a70  09 f2 74 65 78 74 0d 05  46 05 e1 0d 05 50 05 20  |..text..F....P. |
00000a80  0d 05 5a 10 dd f2 77 72  69 74 65 70 61 69 6e 74  |..Z...writepaint|
00000a90  0d 05 64 09 f2 64 61 74  61 0d 05 6e 13 f1 8a 33  |..d..data..n...3|
00000aa0  34 2c 30 29 3b 70 61 69  6e 74 24 3b 0d 05 78 09  |4,0);paint$;..x.|
00000ab0  f2 74 65 78 74 0d 05 82  05 e1 0d 05 8c 05 20 0d  |.text......... .|
00000ac0  05 96 0a dd f2 6d 6f 76  65 0d 05 a0 0d ea 20 6e  |.....move..... n|
00000ad0  79 25 2c 6e 78 25 0d 05  aa 28 6e 78 25 3d 78 70  |y%,nx%...(nx%=xp|
00000ae0  6f 73 25 2b a8 28 64 69  72 65 63 74 69 6f 6e 25  |os%+.(direction%|
00000af0  28 64 69 72 25 2c 30 29  2f 31 30 29 2d 32 0d 05  |(dir%,0)/10)-2..|
00000b00  b4 27 6e 79 25 3d 79 70  6f 73 25 2b 64 69 72 65  |.'ny%=ypos%+dire|
00000b10  63 74 69 6f 6e 25 28 64  69 72 25 2c 30 29 20 83  |ction%(dir%,0) .|
00000b20  20 31 30 2d 32 0d 05 be  3a e7 28 6e 78 25 3c 31  | 10-2...:.(nx%<1|
00000b30  29 84 28 6e 79 25 3c 31  29 84 28 6e 78 25 3e 6d  |).(ny%<1).(nx%>m|
00000b40  61 78 78 25 29 84 28 6e  79 25 3e 6d 61 78 79 25  |axx%).(ny%>maxy%|
00000b50  29 20 8c 20 f2 65 72 72  6f 72 28 39 29 3a e1 0d  |) . .error(9):..|
00000b60  05 c8 34 e7 20 70 65 6e  25 3d 32 20 8c 20 77 6f  |..4. pen%=2 . wo|
00000b70  72 6c 64 25 3f 28 28 78  70 6f 73 25 2d 31 29 2a  |rld%?((xpos%-1)*|
00000b80  32 30 2b 79 70 6f 73 25  29 3d 97 28 70 61 69 6e  |20+ypos%)=.(pain|
00000b90  74 24 29 0d 05 d2 09 f2  70 6c 61 79 0d 05 dc 43  |t$).....play...C|
00000ba0  f1 8a 78 6f 66 66 73 65  74 25 2b 78 70 6f 73 25  |..xoffset%+xpos%|
00000bb0  2c 79 6f 66 66 73 65 74  25 2d 79 70 6f 73 25 29  |,yoffset%-ypos%)|
00000bc0  3b bd 28 77 6f 72 6c 64  25 3f 28 28 78 70 6f 73  |;.(world%?((xpos|
00000bd0  25 2d 31 29 2a 32 30 2b  79 70 6f 73 25 29 29 0d  |%-1)*20+ypos%)).|
00000be0  05 e6 17 78 70 6f 73 25  3d 6e 78 25 3a 79 70 6f  |...xpos%=nx%:ypo|
00000bf0  73 25 3d 6e 79 25 0d 05  f0 09 f2 74 65 78 74 0d  |s%=ny%.....text.|
00000c00  05 fa 10 f2 77 72 69 74  65 74 75 72 74 6c 65 0d  |....writeturtle.|
00000c10  06 04 0d f2 77 72 69 74  65 70 6f 73 0d 06 0e 05  |....writepos....|
00000c20  e1 0d 06 18 05 20 0d 06  22 13 dd f2 4a 55 4d 50  |..... .."...JUMP|
00000c30  54 4f 28 78 25 2c 79 25  29 0d 06 2c 10 e7 20 65  |TO(x%,y%)..,.. e|
00000c40  72 72 6f 72 25 20 8c 20  e1 0d 06 36 36 e7 28 78  |rror% . ...66.(x|
00000c50  25 3c 31 29 84 28 79 25  3c 31 29 84 28 78 25 3e  |%<1).(y%<1).(x%>|
00000c60  6d 61 78 78 25 29 84 28  79 25 3e 6d 61 78 79 25  |maxx%).(y%>maxy%|
00000c70  29 8c 20 f2 65 72 72 6f  72 28 31 30 29 3a e1 0d  |). .error(10):..|
00000c80  06 40 09 f2 70 6c 61 79  0d 06 4a 43 f1 8a 78 6f  |.@..play..JC..xo|
00000c90  66 66 73 65 74 25 2b 78  70 6f 73 25 2c 79 6f 66  |ffset%+xpos%,yof|
00000ca0  66 73 65 74 25 2d 79 70  6f 73 25 29 3b bd 28 77  |fset%-ypos%);.(w|
00000cb0  6f 72 6c 64 25 3f 28 28  78 70 6f 73 25 2d 31 29  |orld%?((xpos%-1)|
00000cc0  2a 32 30 2b 79 70 6f 73  25 29 29 0d 06 54 15 78  |*20+ypos%))..T.x|
00000cd0  70 6f 73 25 3d 78 25 3a  79 70 6f 73 25 3d 79 25  |pos%=x%:ypos%=y%|
00000ce0  0d 06 5e 09 f2 74 65 78  74 0d 06 68 10 f2 77 72  |..^..text..h..wr|
00000cf0  69 74 65 74 75 72 74 6c  65 0d 06 72 0d f2 77 72  |iteturtle..r..wr|
00000d00  69 74 65 70 6f 73 0d 06  7c 05 e1 0d 06 86 05 20  |itepos..|...... |
00000d10  0d 06 90 15 dd f2 44 52  41 57 54 4f 28 78 31 25  |......DRAWTO(x1%|
00000d20  2c 79 31 25 29 0d 06 9a  1f ea 20 78 2c 79 2c 64  |,y1%)..... x,y,d|
00000d30  78 2c 64 79 2c 78 74 25  2c 79 74 25 2c 6c 65 6e  |x,dy,xt%,yt%,len|
00000d40  67 74 68 25 0d 06 a4 10  e7 20 65 72 72 6f 72 25  |gth%..... error%|
00000d50  20 8c 20 e1 0d 06 ae 18  6c 65 6e 67 74 68 25 3d  | . .....length%=|
00000d60  94 28 78 31 25 2d 78 70  6f 73 25 29 0d 06 b8 31  |.(x1%-xpos%)...1|
00000d70  e7 20 94 28 79 31 25 2d  79 70 6f 73 25 29 3e 6c  |. .(y1%-ypos%)>l|
00000d80  65 6e 67 74 68 25 20 8c  20 6c 65 6e 67 74 68 25  |ength% . length%|
00000d90  3d 94 28 79 31 25 2d 79  70 6f 73 25 29 0d 06 c2  |=.(y1%-ypos%)...|
00000da0  31 64 78 3d 28 78 31 25  2d 78 70 6f 73 25 29 2f  |1dx=(x1%-xpos%)/|
00000db0  6c 65 6e 67 74 68 25 3a  64 79 3d 28 79 31 25 2d  |length%:dy=(y1%-|
00000dc0  79 70 6f 73 25 29 2f 6c  65 6e 67 74 68 25 0d 06  |ypos%)/length%..|
00000dd0  cc 1b 78 3d 78 70 6f 73  25 2b 30 2e 35 3a 79 3d  |..x=xpos%+0.5:y=|
00000de0  79 70 6f 73 25 2b 30 2e  35 0d 06 d6 13 e7 20 6c  |ypos%+0.5..... l|
00000df0  65 6e 67 74 68 25 3d 30  20 8c 20 e1 0d 06 e0 05  |ength%=0 . .....|
00000e00  f5 0d 06 ea 15 6c 65 6e  67 74 68 25 3d 6c 65 6e  |.....length%=len|
00000e10  67 74 68 25 2d 31 0d 06  f4 15 78 74 25 3d a8 28  |gth%-1....xt%=.(|
00000e20  78 29 3a 79 74 25 3d a8  28 79 29 0d 06 fe 3b e7  |x):yt%=.(y)...;.|
00000e30  20 28 78 74 25 3e 6d 61  78 78 25 29 84 28 78 74  | (xt%>maxx%).(xt|
00000e40  25 3c 31 29 84 28 79 74  25 3e 6d 61 78 79 25 29  |%<1).(yt%>maxy%)|
00000e50  84 28 79 74 25 3c 31 29  20 8c 20 f2 65 72 72 6f  |.(yt%<1) . .erro|
00000e60  72 28 31 29 3a e1 0d 07  08 34 e7 20 70 65 6e 25  |r(1):....4. pen%|
00000e70  3d 32 20 8c 20 77 6f 72  6c 64 25 3f 28 28 78 70  |=2 . world%?((xp|
00000e80  6f 73 25 2d 31 29 2a 32  30 2b 79 70 6f 73 25 29  |os%-1)*20+ypos%)|
00000e90  3d 97 28 70 61 69 6e 74  24 29 0d 07 12 09 f2 70  |=.(paint$).....p|
00000ea0  6c 61 79 0d 07 1c 44 f1  8a 78 6f 66 66 73 65 74  |lay...D..xoffset|
00000eb0  25 2b 78 70 6f 73 25 2c  79 6f 66 66 73 65 74 25  |%+xpos%,yoffset%|
00000ec0  2d 79 70 6f 73 25 29 3b  bd 28 77 6f 72 6c 64 25  |-ypos%);.(world%|
00000ed0  3f 28 28 78 70 6f 73 25  2d 31 29 2a 32 30 2b 79  |?((xpos%-1)*20+y|
00000ee0  70 6f 73 25 29 29 3b 0d  07 26 11 78 3d 78 2b 64  |pos%));..&.x=x+d|
00000ef0  78 3a 79 3d 79 2b 64 79  0d 07 30 17 78 70 6f 73  |x:y=y+dy..0.xpos|
00000f00  25 3d 78 74 25 3a 79 70  6f 73 25 3d 79 74 25 0d  |%=xt%:ypos%=yt%.|
00000f10  07 3a 20 f2 74 65 78 74  3a f2 77 72 69 74 65 74  |.: .text:.writet|
00000f20  75 72 74 6c 65 3a f2 77  72 69 74 65 70 6f 73 0d  |urtle:.writepos.|
00000f30  07 44 1a fd 20 65 72 72  6f 72 25 20 84 20 28 6c  |.D.. error% . (l|
00000f40  65 6e 67 74 68 25 3c 30  29 0d 07 4e 34 e7 20 70  |ength%<0)..N4. p|
00000f50  65 6e 25 3d 32 20 8c 20  77 6f 72 6c 64 25 3f 28  |en%=2 . world%?(|
00000f60  28 78 70 6f 73 25 2d 31  29 2a 32 30 2b 79 70 6f  |(xpos%-1)*20+ypo|
00000f70  73 25 29 3d 97 28 70 61  69 6e 74 24 29 0d 07 58  |s%)=.(paint$)..X|
00000f80  05 e1 0d 07 62 05 20 0d  07 6c 13 dd f2 46 4f 52  |....b. ..l...FOR|
00000f90  57 41 52 44 28 6e 75 6d  25 29 0d 07 76 10 e7 20  |WARD(num%)..v.. |
00000fa0  65 72 72 6f 72 25 20 8c  20 e1 0d 07 80 1a e7 20  |error% . ...... |
00000fb0  6e 75 6d 25 3c 31 20 8c  20 f2 65 72 72 6f 72 28  |num%<1 . .error(|
00000fc0  32 29 3a e1 0d 07 8a 05  f5 0d 07 94 15 6e 75 6d  |2):..........num|
00000fd0  25 3d 6e 75 6d 25 2d 31  3a f2 6d 6f 76 65 0d 07  |%=num%-1:.move..|
00000fe0  9e 17 fd 20 65 72 72 6f  72 25 20 84 20 28 6e 75  |... error% . (nu|
00000ff0  6d 25 3c 31 29 0d 07 a8  05 e1 0d 07 b2 05 20 0d  |m%<1)......... .|
00001000  07 bc 0e dd f2 74 75 72  6e 6c 65 66 74 0d 07 c6  |.....turnleft...|
00001010  10 e7 20 65 72 72 6f 72  25 20 8c 20 e1 0d 07 d0  |.. error% . ....|
00001020  15 64 69 72 25 3d 28 64  69 72 25 2b 37 29 20 83  |.dir%=(dir%+7) .|
00001030  20 38 0d 07 da 1a f2 77  72 69 74 65 74 75 72 74  | 8.....writeturt|
00001040  6c 65 3a f2 77 72 69 74  65 64 69 72 0d 07 e4 05  |le:.writedir....|
00001050  e1 0d 07 ee 05 20 0d 07  f8 0f dd f2 74 75 72 6e  |..... ......turn|
00001060  72 69 67 68 74 0d 08 02  10 e7 20 65 72 72 6f 72  |right..... error|
00001070  25 20 8c 20 e1 0d 08 0c  16 64 69 72 25 3d 28 64  |% . .....dir%=(d|
00001080  69 72 25 2b 31 37 29 20  83 20 38 0d 08 16 1a f2  |ir%+17) . 8.....|
00001090  77 72 69 74 65 74 75 72  74 6c 65 3a f2 77 72 69  |writeturtle:.wri|
000010a0  74 65 64 69 72 0d 08 20  05 e1 0d 08 2a 05 20 0d  |tedir.. ....*. .|
000010b0  08 34 14 dd f2 4c 45 46  54 28 64 65 67 72 65 65  |.4...LEFT(degree|
000010c0  73 25 29 0d 08 3e 0a ea  20 64 65 67 25 0d 08 48  |s%)..>.. deg%..H|
000010d0  10 e7 20 65 72 72 6f 72  25 20 8c 20 e1 0d 08 52  |.. error% . ...R|
000010e0  16 64 65 67 25 3d 64 65  67 72 65 65 73 25 20 81  |.deg%=degrees% .|
000010f0  20 34 35 0d 08 5c 35 e7  20 28 64 65 67 72 65 65  | 45..\5. (degree|
00001100  73 25 3c 3e 64 65 67 25  2a 34 35 29 84 28 64 65  |s%<>deg%*45).(de|
00001110  67 72 65 65 73 25 3c 3d  30 29 20 8c 20 f2 65 72  |grees%<=0) . .er|
00001120  72 6f 72 28 33 29 3a e1  0d 08 66 05 f5 0d 08 70  |ror(3):...f....p|
00001130  0d f2 74 75 72 6e 6c 65  66 74 0d 08 7a 0f 64 65  |..turnleft..z.de|
00001140  67 25 3d 64 65 67 25 2d  31 0d 08 84 16 fd 20 28  |g%=deg%-1..... (|
00001150  64 65 67 25 3d 30 29 84  20 65 72 72 6f 72 25 0d  |deg%=0). error%.|
00001160  08 8e 05 e1 0d 08 98 05  20 0d 08 a2 15 dd f2 52  |........ ......R|
00001170  49 47 48 54 28 64 65 67  72 65 65 73 25 29 0d 08  |IGHT(degrees%)..|
00001180  ac 0a ea 20 64 65 67 25  0d 08 b6 10 e7 20 65 72  |... deg%..... er|
00001190  72 6f 72 25 20 8c 20 e1  0d 08 c0 16 64 65 67 25  |ror% . .....deg%|
000011a0  3d 64 65 67 72 65 65 73  25 20 81 20 34 35 0d 08  |=degrees% . 45..|
000011b0  ca 35 e7 20 28 64 65 67  72 65 65 73 25 3c 3e 64  |.5. (degrees%<>d|
000011c0  65 67 25 2a 34 35 29 84  28 64 65 67 72 65 65 73  |eg%*45).(degrees|
000011d0  25 3c 3d 30 29 20 8c 20  f2 65 72 72 6f 72 28 34  |%<=0) . .error(4|
000011e0  29 3a e1 0d 08 d4 05 f5  0d 08 de 0e f2 74 75 72  |):...........tur|
000011f0  6e 72 69 67 68 74 0d 08  e8 0f 64 65 67 25 3d 64  |nright....deg%=d|
00001200  65 67 25 2d 31 0d 08 f2  16 fd 20 28 64 65 67 25  |eg%-1..... (deg%|
00001210  3d 30 29 84 20 65 72 72  6f 72 25 0d 08 fc 05 e1  |=0). error%.....|
00001220  0d 09 06 05 20 0d 09 10  0b dd f2 50 45 4e 55 50  |.... ......PENUP|
00001230  0d 09 1a 10 e7 20 65 72  72 6f 72 25 20 8c 20 e1  |..... error% . .|
00001240  0d 09 24 17 70 65 6e 25  3d 31 3a f2 77 72 69 74  |..$.pen%=1:.writ|
00001250  65 74 75 72 74 6c 65 0d  09 2e 05 e1 0d 09 38 05  |eturtle.......8.|
00001260  20 0d 09 42 0d dd f2 50  45 4e 44 4f 57 4e 0d 09  | ..B...PENDOWN..|
00001270  4c 10 e7 20 65 72 72 6f  72 25 20 8c 20 e1 0d 09  |L.. error% . ...|
00001280  56 17 70 65 6e 25 3d 32  3a f2 77 72 69 74 65 74  |V.pen%=2:.writet|
00001290  75 72 74 6c 65 0d 09 60  05 e1 0d 09 6a 05 20 0d  |urtle..`....j. .|
000012a0  09 74 18 dd f2 43 48 41  4e 47 45 50 41 49 4e 54  |.t...CHANGEPAINT|
000012b0  28 6e 65 77 70 24 29 0d  09 7e 10 e7 20 65 72 72  |(newp$)..~.. err|
000012c0  6f 72 25 20 8c 20 e1 0d  09 88 1e e7 20 a9 28 6e  |or% . ...... .(n|
000012d0  65 77 70 24 29 3e 31 20  8c 20 f2 65 72 72 6f 72  |ewp$)>1 . .error|
000012e0  28 35 29 3a e1 0d 09 92  1f e7 20 97 28 6e 65 77  |(5):...... .(new|
000012f0  70 24 29 3c 33 32 20 8c  20 f2 65 72 72 6f 72 28  |p$)<32 . .error(|
00001300  36 29 3a e1 0d 09 9c 10  70 61 69 6e 74 24 3d 6e  |6):.....paint$=n|
00001310  65 77 70 24 0d 09 a6 0f  f2 77 72 69 74 65 70 61  |ewp$.....writepa|
00001320  69 6e 74 0d 09 b0 05 e1  0d 09 ba 05 20 0d 09 c4  |int......... ...|
00001330  0b dd a4 41 48 45 41 44  0d 09 ce 0b ea 20 78 25  |...AHEAD..... x%|
00001340  2c 79 25 0d 09 d8 27 78  25 3d 78 70 6f 73 25 2b  |,y%...'x%=xpos%+|
00001350  a8 28 64 69 72 65 63 74  69 6f 6e 25 28 64 69 72  |.(direction%(dir|
00001360  25 2c 30 29 2f 31 30 29  2d 32 0d 09 e2 27 79 25  |%,0)/10)-2...'y%|
00001370  3d 79 70 6f 73 25 2b 64  69 72 65 63 74 69 6f 6e  |=ypos%+direction|
00001380  25 28 64 69 72 25 2c 30  29 20 83 20 31 30 20 2d  |%(dir%,0) . 10 -|
00001390  32 0d 09 ec 4c e7 20 28  78 25 3c 31 29 84 28 79  |2...L. (x%<1).(y|
000013a0  25 3c 31 29 84 28 78 25  3e 6d 61 78 78 25 29 84  |%<1).(x%>maxx%).|
000013b0  28 79 25 3e 6d 61 78 79  25 29 8c 20 3d bd 28 30  |(y%>maxy%). =.(0|
000013c0  29 20 8b 20 3d bd 28 77  6f 72 6c 64 25 3f 28 28  |) . =.(world%?((|
000013d0  78 25 2d 31 29 2a 32 30  2b 79 25 29 29 0d 09 f6  |x%-1)*20+y%))...|
000013e0  05 20 0d 0a 00 0b dd a4  55 4e 44 45 52 0d 0a 0a  |. ......UNDER...|
000013f0  23 3d bd 28 77 6f 72 6c  64 25 3f 28 28 78 70 6f  |#=.(world%?((xpo|
00001400  73 25 2d 31 29 2a 32 30  2b 79 70 6f 73 25 29 29  |s%-1)*20+ypos%))|
00001410  0d 0a 14 05 20 0d 0a 1e  10 dd a4 58 50 4f 53 3d  |.... ......XPOS=|
00001420  78 70 6f 73 25 0d 0a 28  05 20 0d 0a 32 10 dd a4  |xpos%..(. ..2...|
00001430  59 50 4f 53 3d 79 70 6f  73 25 0d 0a 3c 05 20 0d  |YPOS=ypos%..<. .|
00001440  0a 46 0d dd f2 4e 4f 45  52 52 4f 52 0d 0a 50 0c  |.F...NOERROR..P.|
00001450  65 72 72 6f 72 25 3d a3  0d 0a 5a 05 e1 0d 0a 64  |error%=...Z....d|
00001460  05 20 0d 0a 6e 11 dd f2  65 72 72 6f 72 28 6e 75  |. ..n...error(nu|
00001470  6d 25 29 0d 0a 78 09 f2  74 65 78 74 0d 0a 82 0d  |m%)..x..text....|
00001480  20 65 72 72 6f 72 25 3d  b9 0d 0a 8c 27 e7 20 6e  | error%=....'. n|
00001490  75 6d 25 3d 31 20 8c 20  f1 20 22 49 27 56 45 20  |um%=1 . . "I'VE |
000014a0  48 49 54 20 41 20 4d 41  5a 45 20 57 41 4c 4c 22  |HIT A MAZE WALL"|
000014b0  0d 0a 96 31 e7 20 6e 75  6d 25 3d 32 20 8c 20 f1  |...1. num%=2 . .|
000014c0  20 22 49 20 43 41 4e 20  4e 4f 54 20 47 4f 20 46  | "I CAN NOT GO F|
000014d0  4f 52 57 41 52 44 20 4c  49 4b 45 20 54 48 41 54  |ORWARD LIKE THAT|
000014e0  22 0d 0a a0 30 e7 20 6e  75 6d 25 3d 33 20 8c 20  |"...0. num%=3 . |
000014f0  f1 20 22 49 20 43 41 4e  20 4e 4f 54 20 54 55 52  |. "I CAN NOT TUR|
00001500  4e 20 4c 45 46 54 20 4c  49 4b 45 20 54 48 41 54  |N LEFT LIKE THAT|
00001510  22 0d 0a aa 31 e7 20 6e  75 6d 25 3d 34 20 8c 20  |"...1. num%=4 . |
00001520  f1 20 22 49 20 43 41 4e  20 4e 4f 54 20 54 55 52  |. "I CAN NOT TUR|
00001530  4e 20 52 49 47 48 54 20  4c 49 4b 45 20 54 48 41  |N RIGHT LIKE THA|
00001540  54 22 0d 0a b4 31 e7 20  6e 75 6d 25 3d 35 20 8c  |T"...1. num%=5 .|
00001550  20 f1 20 22 4f 4e 45 20  43 48 41 52 41 43 54 45  | . "ONE CHARACTE|
00001560  52 20 4f 4e 4c 59 20 46  4f 52 20 41 20 50 41 49  |R ONLY FOR A PAI|
00001570  4e 54 22 0d 0a be 32 e7  20 6e 75 6d 25 3d 36 20  |NT"...2. num%=6 |
00001580  8c 20 f1 20 22 4e 4f 4e  2d 50 52 49 4e 54 49 4e  |. . "NON-PRINTIN|
00001590  47 20 50 41 49 4e 54 53  20 4e 4f 54 20 41 4c 4c  |G PAINTS NOT ALL|
000015a0  4f 57 45 44 22 0d 0a c8  1f e7 20 6e 75 6d 25 3d  |OWED"..... num%=|
000015b0  38 20 8c 20 f1 20 22 4e  4f 20 53 55 43 48 20 4d  |8 . . "NO SUCH M|
000015c0  41 5a 45 22 0d 0a d2 31  e7 20 6e 75 6d 25 3d 39  |AZE"...1. num%=9|
000015d0  20 8c 20 f1 20 22 49 27  56 45 20 48 49 54 20 54  | . . "I'VE HIT T|
000015e0  48 45 20 45 44 47 45 20  4f 46 20 54 48 45 20 57  |HE EDGE OF THE W|
000015f0  4f 52 4c 44 22 0d 0a dc  26 e7 20 6e 75 6d 25 3d  |ORLD"...&. num%=|
00001600  31 30 20 8c 20 f1 20 22  49 20 43 41 4e 27 54 20  |10 . . "I CAN'T |
00001610  4a 55 4d 50 20 54 48 45  52 45 22 0d 0a e6 0e f2  |JUMP THERE".....|
00001620  4e 4f 45 52 52 4f 52 3a  e0 0d 0a f0 05 e1 0d 0a  |NOERROR:........|
00001630  fa 05 20 0d 0b 04 16 f4  20 53 68 6f 72 74 2d 66  |.. ..... Short-f|
00001640  6f 72 6d 20 6e 61 6d 65  73 0d 0b 0e 1b dd f2 46  |orm names......F|
00001650  44 28 58 25 29 3a f2 46  4f 52 57 41 52 44 28 58  |D(X%):.FORWARD(X|
00001660  25 29 3a e1 0d 0b 18 19  dd f2 52 54 28 58 25 29  |%):.......RT(X%)|
00001670  3a f2 52 49 47 48 54 28  58 25 29 3a e1 0d 0b 22  |:.RIGHT(X%):..."|
00001680  18 dd f2 4c 54 28 58 25  29 3a f2 4c 45 46 54 28  |...LT(X%):.LEFT(|
00001690  58 25 29 3a e1 0d 0b 2c  11 dd f2 50 55 3a f2 50  |X%):...,...PU:.P|
000016a0  45 4e 55 50 3a e1 0d 0b  36 13 dd f2 50 44 3a f2  |ENUP:...6...PD:.|
000016b0  50 45 4e 44 4f 57 4e 3a  e1 0d 0b 40 1f dd f2 43  |PENDOWN:...@...C|
000016c0  50 28 58 24 29 3a f2 43  48 41 4e 47 45 50 41 49  |P(X$):.CHANGEPAI|
000016d0  4e 54 28 58 24 29 3a e1  0d 0b 4a 17 dd f2 43 53  |NT(X$):...J...CS|
000016e0  3a f2 43 4c 45 41 52 53  43 52 45 45 4e 3a e1 0d  |:.CLEARSCREEN:..|
000016f0  0b 54 22 dd f2 44 52 28  58 25 2c 59 25 29 3a 20  |.T"..DR(X%,Y%): |
00001700  f2 44 52 41 57 54 4f 28  58 25 2c 59 25 29 3a 20  |.DRAWTO(X%,Y%): |
00001710  e1 0d 0b 5e 20 dd f2 4a  50 28 58 25 2c 59 25 29  |...^ ..JP(X%,Y%)|
00001720  3a f2 4a 55 4d 50 54 4f  28 58 25 2c 59 25 29 3a  |:.JUMPTO(X%,Y%):|
00001730  e1 0d 0b 68 15 dd a4 48  45 41 44 49 4e 47 3d 64  |...h...HEADING=d|
00001740  69 72 25 2a 34 35 0d 0b  72 10 dd a4 48 45 3d 64  |ir%*45..r...HE=d|
00001750  69 72 25 2a 34 35 0d 0b  7c 0f dd a4 41 48 3d a4  |ir%*45..|...AH=.|
00001760  41 48 45 41 44 0d 0b 86  0f dd a4 55 4e 3d a4 55  |AHEAD......UN=.U|
00001770  4e 44 45 52 0d 0b 90 0e  dd a4 58 50 3d a4 58 50  |NDER......XP=.XP|
00001780  4f 53 0d 0b 9a 0e dd a4  59 50 3d a4 59 50 4f 53  |OS......YP=.YPOS|
00001790  0d ff                                             |..|
00001792
TURTLE.m0
TURTLE.m1
TURTLE.m2
TURTLE.m4
TURTLE.m5