Home » Personal collection » Acorn tapes » Electron_User » Electron_User_tape06a_acorn_eu_1989_december.wav » WORDSQ

WORDSQ

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 » Electron_User » Electron_User_tape06a_acorn_eu_1989_december.wav
Filename: WORDSQ
Read OK:
File size: 0D8E bytes
Load address: 2000
Exec address: 1900
Duplicates

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

File contents
   10REM Word Square Solver
   20REM by Jeff Tullin
   30REM (c) Electron User
   40:
   50MODE1
   60VDU23,0,10,64,0;0;0;0;
   70VDU23,224,255,129,129,129,129,129,129,255
   80VDU19,2,4,0,0,0,0,0,0
   90:
  100PROCvariables
  110PROCdimensions
  120PROCletter_entry
  130:
  140REPEAT
  150PROCword_entry
  160PROCfind_word
  170UNTIL 0
  180:
  190DEF PROCvariables
  200finished=0
  210DIM array%1200
  220FOR X%=0 TO 1200 STEP 4
  230X%!array%=0:NEXT
  240ENDPROC
  250:
  260DEF PROCdimensions
  270:
  280GCOL0,129:CLG
  290PROCopenwind(10,3,21,3)
  300PRINT:PRINT"  WORDSQUARE SOLVER"
  310VDU26:PRINT TAB(12,7)" by Jeff Tullin "
  320REPEAT
  330PROCopenwind(10,17,21,4)
  340:
  350PRINT TAB(2,1)"WIDTH (max 38) **  ";
  360REPEAT
  370INPUT TAB(17,1)width%
  380UNTIL width%>0 AND width%<39
  390:
  400PRINT TAB(2,2)"HEIGHT(max 25) **  ";
  410REPEAT
  420INPUT TAB(17,2)height%
  430UNTIL height%>0 AND height% <26
  440:
  450VDU28,14,23,26,23,12
  460PRINT" okay (Y/N)?";:VDU 8
  470*FX15
  480REPEAT:A$=GET$
  490UNTIL INSTR("yYnN",A$)
  500UNTIL INSTR("yYnN",A$) <3
  510ENDPROC
  520:
  530DEF PROCletter_entry
  540:
  550VDU26:GCOL0,129:CLG
  560COLOUR 2
  570FOR H% = 1 TO height%
  580FOR W% = 1 TO width%
  590PRINT TAB(W%,H%)CHR$(224)
  600NEXT:NEXT
  610COLOUR 3
  620PROCopenwind(7,27,26,3)
  630PRINT" Use cursor keys plus A-Z"
  640PRINT"      to enter data"
  650PRINT"   RETURN when finished ";
  660:
  670H%=1:W%=1:C%=9
  680*FX4,1
  690VDU 26
  700PRINT TAB(W%,H%);:VDU C%,8
  710REPEAT
  720*FX15
  730PRINT TAB(W%,H%);:VDU 9,8
  740I%=GET
  750W%=W%+(1 AND I%=137 AND W%<width%)-(1 AND I%=136 AND W%>1)
  760H%=H%+(1 AND I%=138 AND H%<height%)-(1 AND I%=139 AND H%>1)
  770C%=9
  780IF I%>64 AND I%<91 C%=I%:?(array%+((H%-1)*width%)+W%-1)=I%
  790PRINT TAB(W%,H%);:VDU C%,8
  800IF W%<width%  AND C%<>9 THEN W%=W%+1:ELSE IF W%=width% AND H% < height% AND C%<>9 THEN W%=1:H%=H%+1
  810UNTIL I%=13
  820ENDPROC
  830:
  840DEF PROCword_entry
  850:
  860REPEAT
  870PROCopenwind(7,27,26,3)
  880PRINT" Please enter hidden word"
  890PRINT"   ....................";
  900INPUT TAB(3,1)""word$
  910UNTIL LEN(word$) AND (LEN(word$) <= width% OR LEN(word$) <= height%)
  920ENDPROC
  930:
  940DEF PROCfind_word
  950:
  960PROCopenwind(7,27,26,3)
  970IF word$="XCLEAR" THEN PROCwhite:ENDPROC
  980IF word$="XEND" THEN END
  990IF word$="XNEW" THEN RUN
 1000PRINT:PRINT"   SEARCHING... "
 1010VDU 26
 1020found=FALSE
 1030FOR start = array% TO array%+(width%*height%)-1
 1040PRINT TAB((start-array%)MOD width%+1,(start-array%)DIV width%+1)"";
 1050IF ?start= ASC(LEFT$(word$,1)) PROCcheck
 1060IF found VDU 7:start=array%+2000
 1070NEXT
 1080ENDPROC
 1090:
 1100DEF PROCcheck
 1110IF FNeast ENDPROC
 1120IF FNsoutheast ENDPROC
 1130IF FNsouth ENDPROC
 1140IF FNsouthwest ENDPROC
 1150IF FNwest ENDPROC
 1160IF FNnorthwest ENDPROC
 1170IF FNnorth ENDPROC
 1180IF FNnortheast ENDPROC
 1190found=0:ENDPROC
 1200ENDPROC
 1210:
 1220DEF FNeast
 1230=FNsearch(0,1)
 1240:
 1250DEF FNsoutheast
 1260=FNsearch(width%,1)
 1270:
 1280DEF FNsouth
 1290=FNsearch(width%,0)
 1300:
 1310DEF FNsouthwest
 1320=FNsearch(width%,-1)
 1330:
 1340DEF FNwest
 1350=FNsearch(0,-1)
 1360:
 1370DEF FNnorthwest
 1380=FNsearch(-width%,-1)
 1390:
 1400DEF FNnorth
 1410=FNsearch(-width%,0)
 1420:
 1430DEF FNnortheast
 1440=FNsearch(-width%,1)
 1450: 
 1460:
 1470DEF FNsearch(hdir%,wdir%)
 1480LOCAL W%,H%,X%
 1490newbyte%=start
 1500found=TRUE
 1510FOR X%= 2 TO LEN word$
 1520newbyte% = newbyte%+ hdir%+ wdir%
 1530IF ?newbyte%<> ASC(MID$(word$,X%,1)) THEN found=FALSE :X%=LEN word$
 1540NEXT
 1550IF NOT found THEN =found
 1560REM else highlite word in blue..
 1570:
 1580origin = start
 1590COLOUR 2
 1600origin = origin-wdir%-hdir%
 1610FOR X%= 1 TO LEN word$
 1620origin = origin+ wdir%+ hdir%
 1630PRINT TAB((origin-array%)MOD width%+1,(origin-array%)DIV width%+1)CHR$(?origin);
 1640NEXT
 1650COLOUR 3
 1660=found
 1670:
 1680DEF PROCopenwind(x,y,len,ht)
 1690VDU 28, x, y+ht-1, x+len-1, y,12
 1700PROCrect(x*32-8, 1016-(y+ht)*32, len*32+12, ht*32+12, 0)
 1710PROCrect(x*32, 1008-(y+ht)*32, len*32+16, 8, 1)
 1720PROCrect((x+len)*32+8, 1008-(y+ht)*32, 8, ht*32+8, 1)
 1730ENDPROC
 1740:
 1750DEF PROCrect(x,y,l,w,f)
 1760MOVE x,y
 1770DRAW x+l,y
 1780IF f=0 DRAW x+l,y+w ELSE PLOT 85,x,y+w
 1790IF f=0 DRAW x,y+w ELSE PLOT 85,x+l,y+w
 1800MOVE x,y+w
 1810IF f=0 DRAW x,y ELSE MOVE x,y
 1820ENDPROC
 1830:
 1840DEF PROCwhite
 1850VDU 26:COLOUR 3
 1860FOR X%= array% TO (width% * height%)+array%
 1870PRINT TAB((X%-array%)MOD width%+1,(X%-array%)DIV width%+1)CHR$(?X%);
 1880NEXT
 1890ENDPROC

� Word Square Solver
� by Jeff Tullin
� (c) Electron User
(:
2�1
<�23,0,10,64,0;0;0;0;
F+�23,224,255,129,129,129,129,129,129,255
P�19,2,4,0,0,0,0,0,0
Z:
d�variables
n�dimensions
x�letter_entry
�:
��
��word_entry
��find_word
�� 0
�:
�� �variables
�finished=0
�� array%1200
�� X%=0 � 1200 � 4
�X%!array%=0:�
��
�:
� �dimensions
:
�0,129:�
"�openwind(10,3,21,3)
,�:�"  WORDSQUARE SOLVER"
6"�26:� �12,7)" by Jeff Tullin "
@�
J�openwind(10,17,21,4)
T:
^!� �2,1)"WIDTH (max 38) **  ";
h�
r� �17,1)width%
|� width%>0 � width%<39
�:
�!� �2,2)"HEIGHT(max 25) **  ";
��
�� �17,2)height%
�� height%>0 � height% <26
�:
��28,14,23,26,23,12
��" okay (Y/N)?";:� 8
�	*FX15
�
�:A$=�
�� �"yYnN",A$)
�� �"yYnN",A$) <3
��
:
� �letter_entry
:
&�26:�0,129:�
0� 2
:� H% = 1 � height%
D� W% = 1 � width%
N� �W%,H%)�(224)
X�:�
b� 3
l�openwind(7,27,26,3)
v �" Use cursor keys plus A-Z"
��"      to enter data"
� �"   RETURN when finished ";
�:
�H%=1:W%=1:C%=9
�
*FX4,1
�� 26
�� �W%,H%);:� C%,8
��
�	*FX15
�� �W%,H%);:� 9,8
�I%=�
�6W%=W%+(1 � I%=137 � W%<width%)-(1 � I%=136 � W%>1)
�7H%=H%+(1 � I%=138 � H%<height%)-(1 � I%=139 � H%>1)
C%=9
;� I%>64 � I%<91 C%=I%:?(array%+((H%-1)*width%)+W%-1)=I%
� �W%,H%);:� C%,8
 V� W%<width%  � C%<>9 � W%=W%+1:� � W%=width% � H% < height% � C%<>9 � W%=1:H%=H%+1
*� I%=13
4�
>:
H� �word_entry
R:
\�
f�openwind(7,27,26,3)
p �" Please enter hidden word"
z�"   ....................";
�� �3,1)""word$
�;� �(word$) � (�(word$) <= width% � �(word$) <= height%)
��
�:
�� �find_word
�:
��openwind(7,27,26,3)
�� word$="XCLEAR" � �white:�
�� word$="XEND" � �
�� word$="XNEW" � �
��:�"   SEARCHING... "
�� 26
�found=�
0� start = array% � array%+(width%*height%)-1
<� �(start-array%)� width%+1,(start-array%)� width%+1)"";
!� ?start= �(�word$,1)) �check
$!� found � 7:start=array%+2000
.�
8�
B:
L� �check
V
� �east �
`� �southeast �
j� �south �
t� �southwest �
~
� �west �
�� �northwest �
�� �north �
�� �northeast �
�
found=0:�
��
�:
�� �east
�=�search(0,1)
�:
�� �southeast
�=�search(width%,1)
�:
� �south

=�search(width%,0)
:
� �southwest
(=�search(width%,-1)
2:
<� �west
F=�search(0,-1)
P:
Z� �northwest
d=�search(-width%,-1)
n:
x� �north
�=�search(-width%,0)
�:
�� �northeast
�=�search(-width%,1)
�: 
�:
�� �search(hdir%,wdir%)
�� W%,H%,X%
�newbyte%=start
�found=�
�� X%= 2 � � word$
�%newbyte% = newbyte%+ hdir%+ wdir%
�7� ?newbyte%<> �(�word$,X%,1)) � found=� :X%=� word$
�
� � found � =found
"� else highlite word in blue..
":
,origin = start
6� 2
@origin = origin-wdir%-hdir%
J� X%= 1 � � word$
T!origin = origin+ wdir%+ hdir%
^F� �(origin-array%)� width%+1,(origin-array%)� width%+1)�(?origin);
h�
r� 3
|
=found
�:
�� �openwind(x,y,len,ht)
�"� 28, x, y+ht-1, x+len-1, y,12
�9�rect(x*32-8, 1016-(y+ht)*32, len*32+12, ht*32+12, 0)
�0�rect(x*32, 1008-(y+ht)*32, len*32+16, 8, 1)
�6�rect((x+len)*32+8, 1008-(y+ht)*32, 8, ht*32+8, 1)
��
�:
�� �rect(x,y,l,w,f)
�	� x,y
�� x+l,y
� � f=0 � x+l,y+w � � 85,x,y+w
� � f=0 � x,y+w � � 85,x+l,y+w
� x,y+w
� f=0 � x,y � � x,y
�
&:
0� �white
:� 26:� 3
D,� X%= array% � (width% * height%)+array%
N:� �(X%-array%)� width%+1,(X%-array%)� width%+1)�(?X%);
X�
b�
�
00000000  0d 00 0a 18 f4 20 57 6f  72 64 20 53 71 75 61 72  |..... Word Squar|
00000010  65 20 53 6f 6c 76 65 72  0d 00 14 14 f4 20 62 79  |e Solver..... by|
00000020  20 4a 65 66 66 20 54 75  6c 6c 69 6e 0d 00 1e 17  | Jeff Tullin....|
00000030  f4 20 28 63 29 20 45 6c  65 63 74 72 6f 6e 20 55  |. (c) Electron U|
00000040  73 65 72 0d 00 28 05 3a  0d 00 32 06 eb 31 0d 00  |ser..(.:..2..1..|
00000050  3c 18 ef 32 33 2c 30 2c  31 30 2c 36 34 2c 30 3b  |<..23,0,10,64,0;|
00000060  30 3b 30 3b 30 3b 0d 00  46 2b ef 32 33 2c 32 32  |0;0;0;..F+.23,22|
00000070  34 2c 32 35 35 2c 31 32  39 2c 31 32 39 2c 31 32  |4,255,129,129,12|
00000080  39 2c 31 32 39 2c 31 32  39 2c 31 32 39 2c 32 35  |9,129,129,129,25|
00000090  35 0d 00 50 17 ef 31 39  2c 32 2c 34 2c 30 2c 30  |5..P..19,2,4,0,0|
000000a0  2c 30 2c 30 2c 30 2c 30  0d 00 5a 05 3a 0d 00 64  |,0,0,0,0..Z.:..d|
000000b0  0e f2 76 61 72 69 61 62  6c 65 73 0d 00 6e 0f f2  |..variables..n..|
000000c0  64 69 6d 65 6e 73 69 6f  6e 73 0d 00 78 11 f2 6c  |dimensions..x..l|
000000d0  65 74 74 65 72 5f 65 6e  74 72 79 0d 00 82 05 3a  |etter_entry....:|
000000e0  0d 00 8c 05 f5 0d 00 96  0f f2 77 6f 72 64 5f 65  |..........word_e|
000000f0  6e 74 72 79 0d 00 a0 0e  f2 66 69 6e 64 5f 77 6f  |ntry.....find_wo|
00000100  72 64 0d 00 aa 07 fd 20  30 0d 00 b4 05 3a 0d 00  |rd..... 0....:..|
00000110  be 10 dd 20 f2 76 61 72  69 61 62 6c 65 73 0d 00  |... .variables..|
00000120  c8 0e 66 69 6e 69 73 68  65 64 3d 30 0d 00 d2 10  |..finished=0....|
00000130  de 20 61 72 72 61 79 25  31 32 30 30 0d 00 dc 15  |. array%1200....|
00000140  e3 20 58 25 3d 30 20 b8  20 31 32 30 30 20 88 20  |. X%=0 . 1200 . |
00000150  34 0d 00 e6 11 58 25 21  61 72 72 61 79 25 3d 30  |4....X%!array%=0|
00000160  3a ed 0d 00 f0 05 e1 0d  00 fa 05 3a 0d 01 04 11  |:..........:....|
00000170  dd 20 f2 64 69 6d 65 6e  73 69 6f 6e 73 0d 01 0e  |. .dimensions...|
00000180  05 3a 0d 01 18 0c e6 30  2c 31 32 39 3a da 0d 01  |.:.....0,129:...|
00000190  22 18 f2 6f 70 65 6e 77  69 6e 64 28 31 30 2c 33  |"..openwind(10,3|
000001a0  2c 32 31 2c 33 29 0d 01  2c 1c f1 3a f1 22 20 20  |,21,3)..,..:."  |
000001b0  57 4f 52 44 53 51 55 41  52 45 20 53 4f 4c 56 45  |WORDSQUARE SOLVE|
000001c0  52 22 0d 01 36 22 ef 32  36 3a f1 20 8a 31 32 2c  |R"..6".26:. .12,|
000001d0  37 29 22 20 62 79 20 4a  65 66 66 20 54 75 6c 6c  |7)" by Jeff Tull|
000001e0  69 6e 20 22 0d 01 40 05  f5 0d 01 4a 19 f2 6f 70  |in "..@....J..op|
000001f0  65 6e 77 69 6e 64 28 31  30 2c 31 37 2c 32 31 2c  |enwind(10,17,21,|
00000200  34 29 0d 01 54 05 3a 0d  01 5e 21 f1 20 8a 32 2c  |4)..T.:..^!. .2,|
00000210  31 29 22 57 49 44 54 48  20 28 6d 61 78 20 33 38  |1)"WIDTH (max 38|
00000220  29 20 2a 2a 20 20 22 3b  0d 01 68 05 f5 0d 01 72  |) **  ";..h....r|
00000230  12 e8 20 8a 31 37 2c 31  29 77 69 64 74 68 25 0d  |.. .17,1)width%.|
00000240  01 7c 1a fd 20 77 69 64  74 68 25 3e 30 20 80 20  |.|.. width%>0 . |
00000250  77 69 64 74 68 25 3c 33  39 0d 01 86 05 3a 0d 01  |width%<39....:..|
00000260  90 21 f1 20 8a 32 2c 32  29 22 48 45 49 47 48 54  |.!. .2,2)"HEIGHT|
00000270  28 6d 61 78 20 32 35 29  20 2a 2a 20 20 22 3b 0d  |(max 25) **  ";.|
00000280  01 9a 05 f5 0d 01 a4 13  e8 20 8a 31 37 2c 32 29  |......... .17,2)|
00000290  68 65 69 67 68 74 25 0d  01 ae 1d fd 20 68 65 69  |height%..... hei|
000002a0  67 68 74 25 3e 30 20 80  20 68 65 69 67 68 74 25  |ght%>0 . height%|
000002b0  20 3c 32 36 0d 01 b8 05  3a 0d 01 c2 16 ef 32 38  | <26....:.....28|
000002c0  2c 31 34 2c 32 33 2c 32  36 2c 32 33 2c 31 32 0d  |,14,23,26,23,12.|
000002d0  01 cc 18 f1 22 20 6f 6b  61 79 20 28 59 2f 4e 29  |...." okay (Y/N)|
000002e0  3f 22 3b 3a ef 20 38 0d  01 d6 09 2a 46 58 31 35  |?";:. 8....*FX15|
000002f0  0d 01 e0 0a f5 3a 41 24  3d be 0d 01 ea 11 fd 20  |.....:A$=...... |
00000300  a7 22 79 59 6e 4e 22 2c  41 24 29 0d 01 f4 14 fd  |."yYnN",A$).....|
00000310  20 a7 22 79 59 6e 4e 22  2c 41 24 29 20 3c 33 0d  | ."yYnN",A$) <3.|
00000320  01 fe 05 e1 0d 02 08 05  3a 0d 02 12 13 dd 20 f2  |........:..... .|
00000330  6c 65 74 74 65 72 5f 65  6e 74 72 79 0d 02 1c 05  |letter_entry....|
00000340  3a 0d 02 26 10 ef 32 36  3a e6 30 2c 31 32 39 3a  |:..&..26:.0,129:|
00000350  da 0d 02 30 07 fb 20 32  0d 02 3a 16 e3 20 48 25  |...0.. 2..:.. H%|
00000360  20 3d 20 31 20 b8 20 68  65 69 67 68 74 25 0d 02  | = 1 . height%..|
00000370  44 15 e3 20 57 25 20 3d  20 31 20 b8 20 77 69 64  |D.. W% = 1 . wid|
00000380  74 68 25 0d 02 4e 13 f1  20 8a 57 25 2c 48 25 29  |th%..N.. .W%,H%)|
00000390  bd 28 32 32 34 29 0d 02  58 07 ed 3a ed 0d 02 62  |.(224)..X..:...b|
000003a0  07 fb 20 33 0d 02 6c 18  f2 6f 70 65 6e 77 69 6e  |.. 3..l..openwin|
000003b0  64 28 37 2c 32 37 2c 32  36 2c 33 29 0d 02 76 20  |d(7,27,26,3)..v |
000003c0  f1 22 20 55 73 65 20 63  75 72 73 6f 72 20 6b 65  |." Use cursor ke|
000003d0  79 73 20 70 6c 75 73 20  41 2d 5a 22 0d 02 80 1a  |ys plus A-Z"....|
000003e0  f1 22 20 20 20 20 20 20  74 6f 20 65 6e 74 65 72  |."      to enter|
000003f0  20 64 61 74 61 22 0d 02  8a 20 f1 22 20 20 20 52  | data"... ."   R|
00000400  45 54 55 52 4e 20 77 68  65 6e 20 66 69 6e 69 73  |ETURN when finis|
00000410  68 65 64 20 22 3b 0d 02  94 05 3a 0d 02 9e 12 48  |hed ";....:....H|
00000420  25 3d 31 3a 57 25 3d 31  3a 43 25 3d 39 0d 02 a8  |%=1:W%=1:C%=9...|
00000430  0a 2a 46 58 34 2c 31 0d  02 b2 08 ef 20 32 36 0d  |.*FX4,1..... 26.|
00000440  02 bc 15 f1 20 8a 57 25  2c 48 25 29 3b 3a ef 20  |.... .W%,H%);:. |
00000450  43 25 2c 38 0d 02 c6 05  f5 0d 02 d0 09 2a 46 58  |C%,8.........*FX|
00000460  31 35 0d 02 da 14 f1 20  8a 57 25 2c 48 25 29 3b  |15..... .W%,H%);|
00000470  3a ef 20 39 2c 38 0d 02  e4 08 49 25 3d a5 0d 02  |:. 9,8....I%=...|
00000480  ee 36 57 25 3d 57 25 2b  28 31 20 80 20 49 25 3d  |.6W%=W%+(1 . I%=|
00000490  31 33 37 20 80 20 57 25  3c 77 69 64 74 68 25 29  |137 . W%<width%)|
000004a0  2d 28 31 20 80 20 49 25  3d 31 33 36 20 80 20 57  |-(1 . I%=136 . W|
000004b0  25 3e 31 29 0d 02 f8 37  48 25 3d 48 25 2b 28 31  |%>1)...7H%=H%+(1|
000004c0  20 80 20 49 25 3d 31 33  38 20 80 20 48 25 3c 68  | . I%=138 . H%<h|
000004d0  65 69 67 68 74 25 29 2d  28 31 20 80 20 49 25 3d  |eight%)-(1 . I%=|
000004e0  31 33 39 20 80 20 48 25  3e 31 29 0d 03 02 08 43  |139 . H%>1)....C|
000004f0  25 3d 39 0d 03 0c 3b e7  20 49 25 3e 36 34 20 80  |%=9...;. I%>64 .|
00000500  20 49 25 3c 39 31 20 43  25 3d 49 25 3a 3f 28 61  | I%<91 C%=I%:?(a|
00000510  72 72 61 79 25 2b 28 28  48 25 2d 31 29 2a 77 69  |rray%+((H%-1)*wi|
00000520  64 74 68 25 29 2b 57 25  2d 31 29 3d 49 25 0d 03  |dth%)+W%-1)=I%..|
00000530  16 15 f1 20 8a 57 25 2c  48 25 29 3b 3a ef 20 43  |... .W%,H%);:. C|
00000540  25 2c 38 0d 03 20 56 e7  20 57 25 3c 77 69 64 74  |%,8.. V. W%<widt|
00000550  68 25 20 20 80 20 43 25  3c 3e 39 20 8c 20 57 25  |h%  . C%<>9 . W%|
00000560  3d 57 25 2b 31 3a 8b 20  e7 20 57 25 3d 77 69 64  |=W%+1:. . W%=wid|
00000570  74 68 25 20 80 20 48 25  20 3c 20 68 65 69 67 68  |th% . H% < heigh|
00000580  74 25 20 80 20 43 25 3c  3e 39 20 8c 20 57 25 3d  |t% . C%<>9 . W%=|
00000590  31 3a 48 25 3d 48 25 2b  31 0d 03 2a 0b fd 20 49  |1:H%=H%+1..*.. I|
000005a0  25 3d 31 33 0d 03 34 05  e1 0d 03 3e 05 3a 0d 03  |%=13..4....>.:..|
000005b0  48 11 dd 20 f2 77 6f 72  64 5f 65 6e 74 72 79 0d  |H.. .word_entry.|
000005c0  03 52 05 3a 0d 03 5c 05  f5 0d 03 66 18 f2 6f 70  |.R.:..\....f..op|
000005d0  65 6e 77 69 6e 64 28 37  2c 32 37 2c 32 36 2c 33  |enwind(7,27,26,3|
000005e0  29 0d 03 70 20 f1 22 20  50 6c 65 61 73 65 20 65  |)..p ." Please e|
000005f0  6e 74 65 72 20 68 69 64  64 65 6e 20 77 6f 72 64  |nter hidden word|
00000600  22 0d 03 7a 1f f1 22 20  20 20 2e 2e 2e 2e 2e 2e  |"..z.."   ......|
00000610  2e 2e 2e 2e 2e 2e 2e 2e  2e 2e 2e 2e 2e 2e 22 3b  |..............";|
00000620  0d 03 84 12 e8 20 8a 33  2c 31 29 22 22 77 6f 72  |..... .3,1)""wor|
00000630  64 24 0d 03 8e 3b fd 20  a9 28 77 6f 72 64 24 29  |d$...;. .(word$)|
00000640  20 80 20 28 a9 28 77 6f  72 64 24 29 20 3c 3d 20  | . (.(word$) <= |
00000650  77 69 64 74 68 25 20 84  20 a9 28 77 6f 72 64 24  |width% . .(word$|
00000660  29 20 3c 3d 20 68 65 69  67 68 74 25 29 0d 03 98  |) <= height%)...|
00000670  05 e1 0d 03 a2 05 3a 0d  03 ac 10 dd 20 f2 66 69  |......:..... .fi|
00000680  6e 64 5f 77 6f 72 64 0d  03 b6 05 3a 0d 03 c0 18  |nd_word....:....|
00000690  f2 6f 70 65 6e 77 69 6e  64 28 37 2c 32 37 2c 32  |.openwind(7,27,2|
000006a0  36 2c 33 29 0d 03 ca 1f  e7 20 77 6f 72 64 24 3d  |6,3)..... word$=|
000006b0  22 58 43 4c 45 41 52 22  20 8c 20 f2 77 68 69 74  |"XCLEAR" . .whit|
000006c0  65 3a e1 0d 03 d4 16 e7  20 77 6f 72 64 24 3d 22  |e:...... word$="|
000006d0  58 45 4e 44 22 20 8c 20  e0 0d 03 de 16 e7 20 77  |XEND" . ...... w|
000006e0  6f 72 64 24 3d 22 58 4e  45 57 22 20 8c 20 f9 0d  |ord$="XNEW" . ..|
000006f0  03 e8 19 f1 3a f1 22 20  20 20 53 45 41 52 43 48  |....:."   SEARCH|
00000700  49 4e 47 2e 2e 2e 20 22  0d 03 f2 08 ef 20 32 36  |ING... "..... 26|
00000710  0d 03 fc 0b 66 6f 75 6e  64 3d a3 0d 04 06 30 e3  |....found=....0.|
00000720  20 73 74 61 72 74 20 3d  20 61 72 72 61 79 25 20  | start = array% |
00000730  b8 20 61 72 72 61 79 25  2b 28 77 69 64 74 68 25  |. array%+(width%|
00000740  2a 68 65 69 67 68 74 25  29 2d 31 0d 04 10 3c f1  |*height%)-1...<.|
00000750  20 8a 28 73 74 61 72 74  2d 61 72 72 61 79 25 29  | .(start-array%)|
00000760  83 20 77 69 64 74 68 25  2b 31 2c 28 73 74 61 72  |. width%+1,(star|
00000770  74 2d 61 72 72 61 79 25  29 81 20 77 69 64 74 68  |t-array%). width|
00000780  25 2b 31 29 22 22 3b 0d  04 1a 21 e7 20 3f 73 74  |%+1)"";...!. ?st|
00000790  61 72 74 3d 20 97 28 c0  77 6f 72 64 24 2c 31 29  |art= .(.word$,1)|
000007a0  29 20 f2 63 68 65 63 6b  0d 04 24 21 e7 20 66 6f  |) .check..$!. fo|
000007b0  75 6e 64 20 ef 20 37 3a  73 74 61 72 74 3d 61 72  |und . 7:start=ar|
000007c0  72 61 79 25 2b 32 30 30  30 0d 04 2e 05 ed 0d 04  |ray%+2000.......|
000007d0  38 05 e1 0d 04 42 05 3a  0d 04 4c 0c dd 20 f2 63  |8....B.:..L.. .c|
000007e0  68 65 63 6b 0d 04 56 0d  e7 20 a4 65 61 73 74 20  |heck..V.. .east |
000007f0  e1 0d 04 60 12 e7 20 a4  73 6f 75 74 68 65 61 73  |...`.. .southeas|
00000800  74 20 e1 0d 04 6a 0e e7  20 a4 73 6f 75 74 68 20  |t ...j.. .south |
00000810  e1 0d 04 74 12 e7 20 a4  73 6f 75 74 68 77 65 73  |...t.. .southwes|
00000820  74 20 e1 0d 04 7e 0d e7  20 a4 77 65 73 74 20 e1  |t ...~.. .west .|
00000830  0d 04 88 12 e7 20 a4 6e  6f 72 74 68 77 65 73 74  |..... .northwest|
00000840  20 e1 0d 04 92 0e e7 20  a4 6e 6f 72 74 68 20 e1  | ...... .north .|
00000850  0d 04 9c 12 e7 20 a4 6e  6f 72 74 68 65 61 73 74  |..... .northeast|
00000860  20 e1 0d 04 a6 0d 66 6f  75 6e 64 3d 30 3a e1 0d  | .....found=0:..|
00000870  04 b0 05 e1 0d 04 ba 05  3a 0d 04 c4 0b dd 20 a4  |........:..... .|
00000880  65 61 73 74 0d 04 ce 11  3d a4 73 65 61 72 63 68  |east....=.search|
00000890  28 30 2c 31 29 0d 04 d8  05 3a 0d 04 e2 10 dd 20  |(0,1)....:..... |
000008a0  a4 73 6f 75 74 68 65 61  73 74 0d 04 ec 16 3d a4  |.southeast....=.|
000008b0  73 65 61 72 63 68 28 77  69 64 74 68 25 2c 31 29  |search(width%,1)|
000008c0  0d 04 f6 05 3a 0d 05 00  0c dd 20 a4 73 6f 75 74  |....:..... .sout|
000008d0  68 0d 05 0a 16 3d a4 73  65 61 72 63 68 28 77 69  |h....=.search(wi|
000008e0  64 74 68 25 2c 30 29 0d  05 14 05 3a 0d 05 1e 10  |dth%,0)....:....|
000008f0  dd 20 a4 73 6f 75 74 68  77 65 73 74 0d 05 28 17  |. .southwest..(.|
00000900  3d a4 73 65 61 72 63 68  28 77 69 64 74 68 25 2c  |=.search(width%,|
00000910  2d 31 29 0d 05 32 05 3a  0d 05 3c 0b dd 20 a4 77  |-1)..2.:..<.. .w|
00000920  65 73 74 0d 05 46 12 3d  a4 73 65 61 72 63 68 28  |est..F.=.search(|
00000930  30 2c 2d 31 29 0d 05 50  05 3a 0d 05 5a 10 dd 20  |0,-1)..P.:..Z.. |
00000940  a4 6e 6f 72 74 68 77 65  73 74 0d 05 64 18 3d a4  |.northwest..d.=.|
00000950  73 65 61 72 63 68 28 2d  77 69 64 74 68 25 2c 2d  |search(-width%,-|
00000960  31 29 0d 05 6e 05 3a 0d  05 78 0c dd 20 a4 6e 6f  |1)..n.:..x.. .no|
00000970  72 74 68 0d 05 82 17 3d  a4 73 65 61 72 63 68 28  |rth....=.search(|
00000980  2d 77 69 64 74 68 25 2c  30 29 0d 05 8c 05 3a 0d  |-width%,0)....:.|
00000990  05 96 10 dd 20 a4 6e 6f  72 74 68 65 61 73 74 0d  |.... .northeast.|
000009a0  05 a0 17 3d a4 73 65 61  72 63 68 28 2d 77 69 64  |...=.search(-wid|
000009b0  74 68 25 2c 31 29 0d 05  aa 06 3a 20 0d 05 b4 05  |th%,1)....: ....|
000009c0  3a 0d 05 be 1a dd 20 a4  73 65 61 72 63 68 28 68  |:..... .search(h|
000009d0  64 69 72 25 2c 77 64 69  72 25 29 0d 05 c8 0e ea  |dir%,wdir%).....|
000009e0  20 57 25 2c 48 25 2c 58  25 0d 05 d2 12 6e 65 77  | W%,H%,X%....new|
000009f0  62 79 74 65 25 3d 73 74  61 72 74 0d 05 dc 0b 66  |byte%=start....f|
00000a00  6f 75 6e 64 3d b9 0d 05  e6 15 e3 20 58 25 3d 20  |ound=...... X%= |
00000a10  32 20 b8 20 a9 20 77 6f  72 64 24 0d 05 f0 25 6e  |2 . . word$...%n|
00000a20  65 77 62 79 74 65 25 20  3d 20 6e 65 77 62 79 74  |ewbyte% = newbyt|
00000a30  65 25 2b 20 68 64 69 72  25 2b 20 77 64 69 72 25  |e%+ hdir%+ wdir%|
00000a40  0d 05 fa 37 e7 20 3f 6e  65 77 62 79 74 65 25 3c  |...7. ?newbyte%<|
00000a50  3e 20 97 28 c1 77 6f 72  64 24 2c 58 25 2c 31 29  |> .(.word$,X%,1)|
00000a60  29 20 8c 20 66 6f 75 6e  64 3d a3 20 3a 58 25 3d  |) . found=. :X%=|
00000a70  a9 20 77 6f 72 64 24 0d  06 04 05 ed 0d 06 0e 16  |. word$.........|
00000a80  e7 20 ac 20 66 6f 75 6e  64 20 8c 20 3d 66 6f 75  |. . found . =fou|
00000a90  6e 64 0d 06 18 22 f4 20  65 6c 73 65 20 68 69 67  |nd...". else hig|
00000aa0  68 6c 69 74 65 20 77 6f  72 64 20 69 6e 20 62 6c  |hlite word in bl|
00000ab0  75 65 2e 2e 0d 06 22 05  3a 0d 06 2c 12 6f 72 69  |ue....".:..,.ori|
00000ac0  67 69 6e 20 3d 20 73 74  61 72 74 0d 06 36 07 fb  |gin = start..6..|
00000ad0  20 32 0d 06 40 1f 6f 72  69 67 69 6e 20 3d 20 6f  | 2..@.origin = o|
00000ae0  72 69 67 69 6e 2d 77 64  69 72 25 2d 68 64 69 72  |rigin-wdir%-hdir|
00000af0  25 0d 06 4a 15 e3 20 58  25 3d 20 31 20 b8 20 a9  |%..J.. X%= 1 . .|
00000b00  20 77 6f 72 64 24 0d 06  54 21 6f 72 69 67 69 6e  | word$..T!origin|
00000b10  20 3d 20 6f 72 69 67 69  6e 2b 20 77 64 69 72 25  | = origin+ wdir%|
00000b20  2b 20 68 64 69 72 25 0d  06 5e 46 f1 20 8a 28 6f  |+ hdir%..^F. .(o|
00000b30  72 69 67 69 6e 2d 61 72  72 61 79 25 29 83 20 77  |rigin-array%). w|
00000b40  69 64 74 68 25 2b 31 2c  28 6f 72 69 67 69 6e 2d  |idth%+1,(origin-|
00000b50  61 72 72 61 79 25 29 81  20 77 69 64 74 68 25 2b  |array%). width%+|
00000b60  31 29 bd 28 3f 6f 72 69  67 69 6e 29 3b 0d 06 68  |1).(?origin);..h|
00000b70  05 ed 0d 06 72 07 fb 20  33 0d 06 7c 0a 3d 66 6f  |....r.. 3..|.=fo|
00000b80  75 6e 64 0d 06 86 05 3a  0d 06 90 1b dd 20 f2 6f  |und....:..... .o|
00000b90  70 65 6e 77 69 6e 64 28  78 2c 79 2c 6c 65 6e 2c  |penwind(x,y,len,|
00000ba0  68 74 29 0d 06 9a 22 ef  20 32 38 2c 20 78 2c 20  |ht)...". 28, x, |
00000bb0  79 2b 68 74 2d 31 2c 20  78 2b 6c 65 6e 2d 31 2c  |y+ht-1, x+len-1,|
00000bc0  20 79 2c 31 32 0d 06 a4  39 f2 72 65 63 74 28 78  | y,12...9.rect(x|
00000bd0  2a 33 32 2d 38 2c 20 31  30 31 36 2d 28 79 2b 68  |*32-8, 1016-(y+h|
00000be0  74 29 2a 33 32 2c 20 6c  65 6e 2a 33 32 2b 31 32  |t)*32, len*32+12|
00000bf0  2c 20 68 74 2a 33 32 2b  31 32 2c 20 30 29 0d 06  |, ht*32+12, 0)..|
00000c00  ae 30 f2 72 65 63 74 28  78 2a 33 32 2c 20 31 30  |.0.rect(x*32, 10|
00000c10  30 38 2d 28 79 2b 68 74  29 2a 33 32 2c 20 6c 65  |08-(y+ht)*32, le|
00000c20  6e 2a 33 32 2b 31 36 2c  20 38 2c 20 31 29 0d 06  |n*32+16, 8, 1)..|
00000c30  b8 36 f2 72 65 63 74 28  28 78 2b 6c 65 6e 29 2a  |.6.rect((x+len)*|
00000c40  33 32 2b 38 2c 20 31 30  30 38 2d 28 79 2b 68 74  |32+8, 1008-(y+ht|
00000c50  29 2a 33 32 2c 20 38 2c  20 68 74 2a 33 32 2b 38  |)*32, 8, ht*32+8|
00000c60  2c 20 31 29 0d 06 c2 05  e1 0d 06 cc 05 3a 0d 06  |, 1).........:..|
00000c70  d6 16 dd 20 f2 72 65 63  74 28 78 2c 79 2c 6c 2c  |... .rect(x,y,l,|
00000c80  77 2c 66 29 0d 06 e0 09  ec 20 78 2c 79 0d 06 ea  |w,f)..... x,y...|
00000c90  0b df 20 78 2b 6c 2c 79  0d 06 f4 20 e7 20 66 3d  |.. x+l,y... . f=|
00000ca0  30 20 df 20 78 2b 6c 2c  79 2b 77 20 8b 20 f0 20  |0 . x+l,y+w . . |
00000cb0  38 35 2c 78 2c 79 2b 77  0d 06 fe 20 e7 20 66 3d  |85,x,y+w... . f=|
00000cc0  30 20 df 20 78 2c 79 2b  77 20 8b 20 f0 20 38 35  |0 . x,y+w . . 85|
00000cd0  2c 78 2b 6c 2c 79 2b 77  0d 07 08 0b ec 20 78 2c  |,x+l,y+w..... x,|
00000ce0  79 2b 77 0d 07 12 17 e7  20 66 3d 30 20 df 20 78  |y+w..... f=0 . x|
00000cf0  2c 79 20 8b 20 ec 20 78  2c 79 0d 07 1c 05 e1 0d  |,y . . x,y......|
00000d00  07 26 05 3a 0d 07 30 0c  dd 20 f2 77 68 69 74 65  |.&.:..0.. .white|
00000d10  0d 07 3a 0c ef 20 32 36  3a fb 20 33 0d 07 44 2c  |..:.. 26:. 3..D,|
00000d20  e3 20 58 25 3d 20 61 72  72 61 79 25 20 b8 20 28  |. X%= array% . (|
00000d30  77 69 64 74 68 25 20 2a  20 68 65 69 67 68 74 25  |width% * height%|
00000d40  29 2b 61 72 72 61 79 25  0d 07 4e 3a f1 20 8a 28  |)+array%..N:. .(|
00000d50  58 25 2d 61 72 72 61 79  25 29 83 20 77 69 64 74  |X%-array%). widt|
00000d60  68 25 2b 31 2c 28 58 25  2d 61 72 72 61 79 25 29  |h%+1,(X%-array%)|
00000d70  81 20 77 69 64 74 68 25  2b 31 29 bd 28 3f 58 25  |. width%+1).(?X%|
00000d80  29 3b 0d 07 58 05 ed 0d  07 62 05 e1 0d ff        |);..X....b....|
00000d8e
WORDSQ.m0
WORDSQ.m1
WORDSQ.m2
WORDSQ.m4
WORDSQ.m5