Home » Personal collection » Acorn tapes » Own_Work » drawer_tr_tape02a_hf90_acorn_finished_programs.wav » Maze

Maze

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 » Own_Work » drawer_tr_tape02a_hf90_acorn_finished_programs.wav
Filename: Maze
Read OK:
File size: 0562 bytes
Load address: FFFF0E00
Exec address: FFFF8023
File contents
   10 *OPT 1,2
   20 *OPT 3,1
   30 MODE 6
   40 DIM A(20,20)
   50 INPUT"Do you want to (D)esign or (P)lay";TY$
   60 IF TY$="D"THEN 90
   70 IF TY$="P"THEN 470
   80 GOTO 50
   90 YA=0:YD=0
  100 CLS
  110 A$=GET$
  120 IF A$="W" THEN A(YA,YD)=10
  130 IF A$="S" THEN A(YA,YD)=0
  140 IF A$="B"THEN A(YA,YD)=8
  150 IF A$="F"THEN A(YA,YD)=9
  160PRINTTAB(YA,YD);CHR$(A(YA,YD)+32);
  170 IF A$="Q"THEN END
  180 IF A$="T"THEN 320
  190 IF A$="L"THEN 380
  200 IF A$="Z"THEN YA=YA-1
  210 IF A$="X"THEN YA=YA+1
  220 IF A$="/"THEN YD=YD+1
  230 IF A$=":"THEN YD=YD-1
  240 IF YA>20 THEN YA=20
  250 IF YA<0 THEN YA=0
  260 IF YD>20 THEN YD=20
  270 IF YD<0 THEN YD=0
  280 VDU 23,1,0;0;0;0,11
  290 VDU 23,1,1;0;0;0,11
  300 PRINT TAB(YA,YD);
  310 GOTO 110
  320 CLS:PRINT
  330 F=OPENOUT"MAZE-DATA"
  340 FOR Z=0 TO 20:FOR X=0 TO 20
  350 PRINT#F,A(Z,X)
  360 NEXT X:NEXT Z
  370 CLOSE#F:GOTO 440
  380 CLS:PRINT
  390 F=OPENIN"MAZE-DATA"
  400 FOR Z=0 TO 20:FOR X=0 TO 20
  410 INPUT#F,A(Z,X)
  420 NEXT X:NEXT Z
  430 CLOSE#F
  440 CLS:FOR Z=0 TO 20:FOR X=0 TO 20
  450 PRINTTAB(Z,X);CHR$(A(Z,X)+32);
  460 NEXT,:YA=0:YD=0:GOTO 110
  470 F=OPENIN"MAZE-DATA"
  480 FOR Z=0 TO 20:FOR X=0 TO 20
  490 INPUT#F,A(Z,X)
  500 NEXT X:NEXT Z
  510 CLOSE#F
  520 CLS:FOR Z=0 TO 20:FOR X=0 TO 20
  530 PRINTTAB(Z,X);CHR$(A(Z,X)+32);
  540 NEXT
  550 FOR Z=0 TO 20:FOR X=0 TO 20
  560 IF A(Z,X)=8 THEN Q=Z:W=X
  570 IF A(Z,X)=9 THEN E=Z:W=X
  580 NEXT X:NEXT Z
  590 YA=Q:YD=W:TE=TIME
  600 A$=GET$
  610 IF A$="Z"THEN IF A(YA-1,YD)=0 OR A(YA-1,YD)=9 THEN YA=YA-1
  620 IF A$="X"THEN IF A(YA+1,YD)=0OR A(YA+1,YD)=9 THEN YA=YA+1
  630 IF A$=":"THEN IF A(YA,YD-1)=0 OR A(YA,YD-1)=9 THEN YD=YD-1
  640 IF A$="/"THEN IF A(YA,YD+1)=0 OR A(YA,YD+1)=9 THEN YD=YD+1
  650 IF A(YA,YD)=9 THEN RUN
  660 IF TIME>TE+30 THEN 590
  670 GOTO 600


 *OPT 1,2

 *OPT 3,1
 � 6
( � A(20,20)
2- �"Do you want to (D)esign or (P)lay";TY$
< � TY$="D"� �DZ@
F � TY$="P"� �dVA
P � �Tr@
Z YA=0:YD=0
d �
n	 A$=�
x � A$="W" � A(YA,YD)=10
� � A$="S" � A(YA,YD)=0
� � A$="B"� A(YA,YD)=8
� � A$="F"� A(YA,YD)=9
��YA,YD);�(A(YA,YD)+32);
� � A$="Q"� �
� � A$="T"� �D@A
� � A$="L"� �D|A
� � A$="Z"� YA=YA-1
� � A$="X"� YA=YA+1
� � A$="/"� YD=YD+1
� � A$=":"� YD=YD-1
� � YA>20 � YA=20
� � YA<0 � YA=0
 � YD>20 � YD=20
 � YD<0 � YD=0
 � 23,1,0;0;0;0,11
" � 23,1,1;0;0;0,11
, � �YA,YD);
6 � �Dn@
@ �:�
J F=�"MAZE-DATA"
T � Z=0 � 20:� X=0 � 20
^ �#F,A(Z,X)
h � X:� Z
r �#F:� �txA
| �:�
� F=�"MAZE-DATA"
� � Z=0 � 20:� X=0 � 20
� �#F,A(Z,X)
� � X:� Z
� �#F
� �:� Z=0 � 20:� X=0 � 20
� �Z,X);�(A(Z,X)+32);
� �,:YA=0:YD=0:� �Dn@
� F=�"MAZE-DATA"
� � Z=0 � 20:� X=0 � 20
� �#F,A(Z,X)
� � X:� Z
� �#F
 �:� Z=0 � 20:� X=0 � 20
 �Z,X);�(A(Z,X)+32);
 �
& � Z=0 � 20:� X=0 � 20
0 � A(Z,X)=8 � Q=Z:W=X
: � A(Z,X)=9 � E=Z:W=X
D � X:� Z
N YA=Q:YD=W:TE=�
X	 A$=�
b6 � A$="Z"� � A(YA-1,YD)=0 � A(YA-1,YD)=9 � YA=YA-1
l5 � A$="X"� � A(YA+1,YD)=0� A(YA+1,YD)=9 � YA=YA+1
v6 � A$=":"� � A(YA,YD-1)=0 � A(YA,YD-1)=9 � YD=YD-1
�6 � A$="/"� � A(YA,YD+1)=0 � A(YA,YD+1)=9 � YD=YD+1
� � A(YA,YD)=9 � �
� � �>TE+30 � �DNB
� � �DXB
�
00000000  0d 00 0a 0d 20 2a 4f 50  54 20 31 2c 32 0d 00 14  |.... *OPT 1,2...|
00000010  0d 20 2a 4f 50 54 20 33  2c 31 0d 00 1e 08 20 eb  |. *OPT 3,1.... .|
00000020  20 36 0d 00 28 0f 20 de  20 41 28 32 30 2c 32 30  | 6..(. . A(20,20|
00000030  29 0d 00 32 2d 20 e8 22  44 6f 20 79 6f 75 20 77  |)..2- ."Do you w|
00000040  61 6e 74 20 74 6f 20 28  44 29 65 73 69 67 6e 20  |ant to (D)esign |
00000050  6f 72 20 28 50 29 6c 61  79 22 3b 54 59 24 0d 00  |or (P)lay";TY$..|
00000060  3c 14 20 e7 20 54 59 24  3d 22 44 22 8c 20 8d 44  |<. . TY$="D". .D|
00000070  5a 40 0d 00 46 14 20 e7  20 54 59 24 3d 22 50 22  |Z@..F. . TY$="P"|
00000080  8c 20 8d 64 56 41 0d 00  50 0b 20 e5 20 8d 54 72  |. .dVA..P. . .Tr|
00000090  40 0d 00 5a 0e 20 59 41  3d 30 3a 59 44 3d 30 0d  |@..Z. YA=0:YD=0.|
000000a0  00 64 06 20 db 0d 00 6e  09 20 41 24 3d be 0d 00  |.d. ...n. A$=...|
000000b0  78 1b 20 e7 20 41 24 3d  22 57 22 20 8c 20 41 28  |x. . A$="W" . A(|
000000c0  59 41 2c 59 44 29 3d 31  30 0d 00 82 1a 20 e7 20  |YA,YD)=10.... . |
000000d0  41 24 3d 22 53 22 20 8c  20 41 28 59 41 2c 59 44  |A$="S" . A(YA,YD|
000000e0  29 3d 30 0d 00 8c 19 20  e7 20 41 24 3d 22 42 22  |)=0.... . A$="B"|
000000f0  8c 20 41 28 59 41 2c 59  44 29 3d 38 0d 00 96 19  |. A(YA,YD)=8....|
00000100  20 e7 20 41 24 3d 22 46  22 8c 20 41 28 59 41 2c  | . A$="F". A(YA,|
00000110  59 44 29 3d 39 0d 00 a0  1c f1 8a 59 41 2c 59 44  |YD)=9......YA,YD|
00000120  29 3b bd 28 41 28 59 41  2c 59 44 29 2b 33 32 29  |);.(A(YA,YD)+32)|
00000130  3b 0d 00 aa 10 20 e7 20  41 24 3d 22 51 22 8c 20  |;.... . A$="Q". |
00000140  e0 0d 00 b4 13 20 e7 20  41 24 3d 22 54 22 8c 20  |..... . A$="T". |
00000150  8d 44 40 41 0d 00 be 13  20 e7 20 41 24 3d 22 4c  |.D@A.... . A$="L|
00000160  22 8c 20 8d 44 7c 41 0d  00 c8 16 20 e7 20 41 24  |". .D|A.... . A$|
00000170  3d 22 5a 22 8c 20 59 41  3d 59 41 2d 31 0d 00 d2  |="Z". YA=YA-1...|
00000180  16 20 e7 20 41 24 3d 22  58 22 8c 20 59 41 3d 59  |. . A$="X". YA=Y|
00000190  41 2b 31 0d 00 dc 16 20  e7 20 41 24 3d 22 2f 22  |A+1.... . A$="/"|
000001a0  8c 20 59 44 3d 59 44 2b  31 0d 00 e6 16 20 e7 20  |. YD=YD+1.... . |
000001b0  41 24 3d 22 3a 22 8c 20  59 44 3d 59 44 2d 31 0d  |A$=":". YD=YD-1.|
000001c0  00 f0 14 20 e7 20 59 41  3e 32 30 20 8c 20 59 41  |... . YA>20 . YA|
000001d0  3d 32 30 0d 00 fa 12 20  e7 20 59 41 3c 30 20 8c  |=20.... . YA<0 .|
000001e0  20 59 41 3d 30 0d 01 04  14 20 e7 20 59 44 3e 32  | YA=0.... . YD>2|
000001f0  30 20 8c 20 59 44 3d 32  30 0d 01 0e 12 20 e7 20  |0 . YD=20.... . |
00000200  59 44 3c 30 20 8c 20 59  44 3d 30 0d 01 18 16 20  |YD<0 . YD=0.... |
00000210  ef 20 32 33 2c 31 2c 30  3b 30 3b 30 3b 30 2c 31  |. 23,1,0;0;0;0,1|
00000220  31 0d 01 22 16 20 ef 20  32 33 2c 31 2c 31 3b 30  |1..". . 23,1,1;0|
00000230  3b 30 3b 30 2c 31 31 0d  01 2c 0f 20 f1 20 8a 59  |;0;0,11..,. . .Y|
00000240  41 2c 59 44 29 3b 0d 01  36 0b 20 e5 20 8d 44 6e  |A,YD);..6. . .Dn|
00000250  40 0d 01 40 08 20 db 3a  f1 0d 01 4a 13 20 46 3d  |@..@. .:...J. F=|
00000260  ae 22 4d 41 5a 45 2d 44  41 54 41 22 0d 01 54 1a  |."MAZE-DATA"..T.|
00000270  20 e3 20 5a 3d 30 20 b8  20 32 30 3a e3 20 58 3d  | . Z=0 . 20:. X=|
00000280  30 20 b8 20 32 30 0d 01  5e 0f 20 f1 23 46 2c 41  |0 . 20..^. .#F,A|
00000290  28 5a 2c 58 29 0d 01 68  0c 20 ed 20 58 3a ed 20  |(Z,X)..h. . X:. |
000002a0  5a 0d 01 72 0f 20 d9 23  46 3a e5 20 8d 74 78 41  |Z..r. .#F:. .txA|
000002b0  0d 01 7c 08 20 db 3a f1  0d 01 86 13 20 46 3d 8e  |..|. .:..... F=.|
000002c0  22 4d 41 5a 45 2d 44 41  54 41 22 0d 01 90 1a 20  |"MAZE-DATA".... |
000002d0  e3 20 5a 3d 30 20 b8 20  32 30 3a e3 20 58 3d 30  |. Z=0 . 20:. X=0|
000002e0  20 b8 20 32 30 0d 01 9a  0f 20 e8 23 46 2c 41 28  | . 20.... .#F,A(|
000002f0  5a 2c 58 29 0d 01 a4 0c  20 ed 20 58 3a ed 20 5a  |Z,X).... . X:. Z|
00000300  0d 01 ae 08 20 d9 23 46  0d 01 b8 1c 20 db 3a e3  |.... .#F.... .:.|
00000310  20 5a 3d 30 20 b8 20 32  30 3a e3 20 58 3d 30 20  | Z=0 . 20:. X=0 |
00000320  b8 20 32 30 0d 01 c2 19  20 f1 8a 5a 2c 58 29 3b  |. 20.... ..Z,X);|
00000330  bd 28 41 28 5a 2c 58 29  2b 33 32 29 3b 0d 01 cc  |.(A(Z,X)+32);...|
00000340  18 20 ed 2c 3a 59 41 3d  30 3a 59 44 3d 30 3a e5  |. .,:YA=0:YD=0:.|
00000350  20 8d 44 6e 40 0d 01 d6  13 20 46 3d 8e 22 4d 41  | .Dn@.... F=."MA|
00000360  5a 45 2d 44 41 54 41 22  0d 01 e0 1a 20 e3 20 5a  |ZE-DATA".... . Z|
00000370  3d 30 20 b8 20 32 30 3a  e3 20 58 3d 30 20 b8 20  |=0 . 20:. X=0 . |
00000380  32 30 0d 01 ea 0f 20 e8  23 46 2c 41 28 5a 2c 58  |20.... .#F,A(Z,X|
00000390  29 0d 01 f4 0c 20 ed 20  58 3a ed 20 5a 0d 01 fe  |).... . X:. Z...|
000003a0  08 20 d9 23 46 0d 02 08  1c 20 db 3a e3 20 5a 3d  |. .#F.... .:. Z=|
000003b0  30 20 b8 20 32 30 3a e3  20 58 3d 30 20 b8 20 32  |0 . 20:. X=0 . 2|
000003c0  30 0d 02 12 19 20 f1 8a  5a 2c 58 29 3b bd 28 41  |0.... ..Z,X);.(A|
000003d0  28 5a 2c 58 29 2b 33 32  29 3b 0d 02 1c 06 20 ed  |(Z,X)+32);.... .|
000003e0  0d 02 26 1a 20 e3 20 5a  3d 30 20 b8 20 32 30 3a  |..&. . Z=0 . 20:|
000003f0  e3 20 58 3d 30 20 b8 20  32 30 0d 02 30 19 20 e7  |. X=0 . 20..0. .|
00000400  20 41 28 5a 2c 58 29 3d  38 20 8c 20 51 3d 5a 3a  | A(Z,X)=8 . Q=Z:|
00000410  57 3d 58 0d 02 3a 19 20  e7 20 41 28 5a 2c 58 29  |W=X..:. . A(Z,X)|
00000420  3d 39 20 8c 20 45 3d 5a  3a 57 3d 58 0d 02 44 0c  |=9 . E=Z:W=X..D.|
00000430  20 ed 20 58 3a ed 20 5a  0d 02 4e 13 20 59 41 3d  | . X:. Z..N. YA=|
00000440  51 3a 59 44 3d 57 3a 54  45 3d 91 0d 02 58 09 20  |Q:YD=W:TE=...X. |
00000450  41 24 3d be 0d 02 62 36  20 e7 20 41 24 3d 22 5a  |A$=...b6 . A$="Z|
00000460  22 8c 20 e7 20 41 28 59  41 2d 31 2c 59 44 29 3d  |". . A(YA-1,YD)=|
00000470  30 20 84 20 41 28 59 41  2d 31 2c 59 44 29 3d 39  |0 . A(YA-1,YD)=9|
00000480  20 8c 20 59 41 3d 59 41  2d 31 0d 02 6c 35 20 e7  | . YA=YA-1..l5 .|
00000490  20 41 24 3d 22 58 22 8c  20 e7 20 41 28 59 41 2b  | A$="X". . A(YA+|
000004a0  31 2c 59 44 29 3d 30 84  20 41 28 59 41 2b 31 2c  |1,YD)=0. A(YA+1,|
000004b0  59 44 29 3d 39 20 8c 20  59 41 3d 59 41 2b 31 0d  |YD)=9 . YA=YA+1.|
000004c0  02 76 36 20 e7 20 41 24  3d 22 3a 22 8c 20 e7 20  |.v6 . A$=":". . |
000004d0  41 28 59 41 2c 59 44 2d  31 29 3d 30 20 84 20 41  |A(YA,YD-1)=0 . A|
000004e0  28 59 41 2c 59 44 2d 31  29 3d 39 20 8c 20 59 44  |(YA,YD-1)=9 . YD|
000004f0  3d 59 44 2d 31 0d 02 80  36 20 e7 20 41 24 3d 22  |=YD-1...6 . A$="|
00000500  2f 22 8c 20 e7 20 41 28  59 41 2c 59 44 2b 31 29  |/". . A(YA,YD+1)|
00000510  3d 30 20 84 20 41 28 59  41 2c 59 44 2b 31 29 3d  |=0 . A(YA,YD+1)=|
00000520  39 20 8c 20 59 44 3d 59  44 2b 31 0d 02 8a 15 20  |9 . YD=YD+1.... |
00000530  e7 20 41 28 59 41 2c 59  44 29 3d 39 20 8c 20 f9  |. A(YA,YD)=9 . .|
00000540  0d 02 94 15 20 e7 20 91  3e 54 45 2b 33 30 20 8c  |.... . .>TE+30 .|
00000550  20 8d 44 4e 42 0d 02 9e  0b 20 e5 20 8d 44 58 42  | .DNB.... . .DXB|
00000560  0d ff                                             |..|
00000562
Maze.m0
Maze.m1
Maze.m2
Maze.m4
Maze.m5