Home » Personal collection » Acorn ADFS disks » Electron » Acornsoft_Educational.ADF » Me+MyMicro/ANAGRAMS

Me+MyMicro/ANAGRAMS

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 ADFS disks » Electron » Acornsoft_Educational.ADF
Filename: Me+MyMicro/ANAGRAMS
Read OK:
File size: 066D bytes
Load address: FFFF1B00
Exec address: FFFF8023
File contents
   10 REM     ...Anagrams...
   20 
   30 REM      ...Electron Version 1...
   40 
   50 REM Copyright (c) Acornsoft 1984
   60 
   70 MODE 1
   80 j$=""
   90 REM blue background
  100 VDU19,0,4,0,0,0
  110 CLS
  120 
  130 PROCplayer1_input
  140 
  150 PROCshuffle_word
  160 
  170 PROCplayer2_input
  180 
  190 PROCresults
  200 
  210 PRINT''"  Do you want to play again (Y/N) ?";
  220 REPEAT g=INSTR("YyNn",GET$)
  230 UNTIL g<>0
  240 IF g<3 THEN 80
  250 MODE 6: PRINT'''': END
  260 
  270REM*********** E n d ************
  280 
  290REM*** S u b r o u t i n e s ****
  300 
  310DEF PROCplayer1_input
  320 PRINT ''"        ANAGRAMS FOR TWO PLAYERS"
  330 PRINT ''"Player 1,"''" Please type in your word to be shuffled"
  340 REPEAT: INPUT TAB(0,9);w$;
  350 UNTIL w$<>""
  360 c$=w$
  370 CLS:PRINT ''"        ANAGRAMS FOR TWO PLAYERS"
  380ENDPROC
  390 
  400DEF PROCshuffle_word
  410 FOR k=1 TO LEN c$
  420   l=LEN w$
  430   n=RND(l)
  440   j$=j$+MID$(w$,n,1)
  450   w$=LEFT$(w$,n-1)+RIGHT$(w$,LEN(w$)-n)
  460 NEXT k
  470 used$=j$
  480ENDPROC
  490 
  500DEF PROCplayer2_input
  510 COLOUR2:PRINT TAB(10,7);j$
  520 PRINT TAB(0,4);"Player 2, guess letter by letter.":PRINT TAB(9,9);"What letter next ?"
  530 errors=0
  540 FOR n=1 TO LEN c$
  550 
  560   REPEAT
  570    PRINT TAB(27,9);
  580    g$=GET$:COLOUR3:PRINT " ";g$;
  590    IF g$<>MID$(c$,n,1) THEN PROCwrong
  600   UNTIL g$=MID$(c$,n,1)
  610 
  620   COLOUR 2
  630   PRINT TAB(9+n,11);g$
  640   p=INSTR(used$,g$)
  650   COLOUR 1
  660   PRINT TAB(9+p,7);g$
  670   used$=LEFT$(used$,p-1)+"*"+RIGHT$(used$,LEN(used$)-p)
  680   SOUND1,-15,50,2
  690 NEXT n
  700ENDPROC
  710 
  720DEF PROCwrong
  730 IF g$>CHR$31 AND g$<CHR$127 THEN errors=errors+1
  740 PRINT TAB(10,16);"Number of errors=";errors
  750 SOUND1,-15,150,2
  760ENDPROC
  770 
  780DEF PROCresults
  790 COLOUR3
  800 PRINT TAB(11,14);"C O R R E C T !"
  810 REM black background
  820 VDU19,0,0,0,0,0
  830 FOR n=1 TO 20
  840   SOUND1,-15,n*2,2
  850   FOR i=1 TO 3
  860    VDU19,i,RND(8)-1,0,0,0
  870   NEXT i
  880 NEXT n
  890 VDU 20
  900 PRINT TAB(10,16);"Number of errors=";errors
  910 PRINT TAB(13,18);"Well done!"
  920ENDPROC

 �     ...Anagrams...
 
$ �      ...Electron Version 1...
( 
2# � Copyright (c) Acornsoft 1984
< 
F � 1
P
 j$=""
Z � blue background
d �19,0,4,0,0,0
n �
x 
� �player1_input
� 
� �shuffle_word
� 
� �player2_input
� 
�
 �results
� 
�. �''"  Do you want to play again (Y/N) ?";
� � g=�"YyNn",�)
� � g<>0
� � g<3 � �DP@
� � 6: �'''': �
 
#�*********** E n d ************
 
"#�*** S u b r o u t i n e s ****
, 
6� �player1_input
@+ � ''"        ANAGRAMS FOR TWO PLAYERS"
J@ � ''"Player 1,"''" Please type in your word to be shuffled"
T �: � �0,9);w$;
^
 � w$<>""
h
 c$=w$
r- �:� ''"        ANAGRAMS FOR TWO PLAYERS"
|�
� 
�� �shuffle_word
� � k=1 � � c$
�
   l=� w$
�
   n=�(l)
�   j$=j$+�w$,n,1)
�   w$=�w$,n-1)+�w$,�(w$)-n)
� � k
�
 used$=j$
��
� 
�� �player2_input
� �2:� �10,7);j$
M � �0,4);"Player 2, guess letter by letter.":� �9,9);"What letter next ?"

 errors=0
 � n=1 � � c$
& 
0   �
:    � �27,9);
D    g$=�:�3:� " ";g$;
N    � g$<>�c$,n,1) � �wrong
X   � g$=�c$,n,1)
b 
l
   � 2
v   � �9+n,11);g$
�   p=�used$,g$)
�
   � 1
�   � �9+p,7);g$
�/   used$=�used$,p-1)+"*"+�used$,�(used$)-p)
�   �1,-15,50,2
� � n
��
� 
�� �wrong
�) � g$>�31 � g$<�127 � errors=errors+1
�) � �10,16);"Number of errors=";errors
� �1,-15,150,2
��
 
� �results
 �3
   � �11,14);"C O R R E C T !"
* � black background
4 �19,0,0,0,0,0
> � n=1 � 20
H   �1,-15,n*2,2
R   � i=1 � 3
\    �19,i,�(8)-1,0,0,0
f
   � i
p � n
z	 � 20
�) � �10,16);"Number of errors=";errors
� � �13,18);"Well done!"
��
�
00000000  0d 00 0a 19 20 f4 20 20  20 20 20 2e 2e 2e 41 6e  |.... .     ...An|
00000010  61 67 72 61 6d 73 2e 2e  2e 0d 00 14 05 20 0d 00  |agrams....... ..|
00000020  1e 24 20 f4 20 20 20 20  20 20 2e 2e 2e 45 6c 65  |.$ .      ...Ele|
00000030  63 74 72 6f 6e 20 56 65  72 73 69 6f 6e 20 31 2e  |ctron Version 1.|
00000040  2e 2e 0d 00 28 05 20 0d  00 32 23 20 f4 20 43 6f  |....(. ..2# . Co|
00000050  70 79 72 69 67 68 74 20  28 63 29 20 41 63 6f 72  |pyright (c) Acor|
00000060  6e 73 6f 66 74 20 31 39  38 34 0d 00 3c 05 20 0d  |nsoft 1984..<. .|
00000070  00 46 08 20 eb 20 31 0d  00 50 0a 20 6a 24 3d 22  |.F. . 1..P. j$="|
00000080  22 0d 00 5a 16 20 f4 20  62 6c 75 65 20 62 61 63  |"..Z. . blue bac|
00000090  6b 67 72 6f 75 6e 64 0d  00 64 12 20 ef 31 39 2c  |kground..d. .19,|
000000a0  30 2c 34 2c 30 2c 30 2c  30 0d 00 6e 06 20 db 0d  |0,4,0,0,0..n. ..|
000000b0  00 78 05 20 0d 00 82 13  20 f2 70 6c 61 79 65 72  |.x. .... .player|
000000c0  31 5f 69 6e 70 75 74 0d  00 8c 05 20 0d 00 96 12  |1_input.... ....|
000000d0  20 f2 73 68 75 66 66 6c  65 5f 77 6f 72 64 0d 00  | .shuffle_word..|
000000e0  a0 05 20 0d 00 aa 13 20  f2 70 6c 61 79 65 72 32  |.. .... .player2|
000000f0  5f 69 6e 70 75 74 0d 00  b4 05 20 0d 00 be 0d 20  |_input.... .... |
00000100  f2 72 65 73 75 6c 74 73  0d 00 c8 05 20 0d 00 d2  |.results.... ...|
00000110  2e 20 f1 27 27 22 20 20  44 6f 20 79 6f 75 20 77  |. .''"  Do you w|
00000120  61 6e 74 20 74 6f 20 70  6c 61 79 20 61 67 61 69  |ant to play agai|
00000130  6e 20 28 59 2f 4e 29 20  3f 22 3b 0d 00 dc 13 20  |n (Y/N) ?";.... |
00000140  f5 20 67 3d a7 22 59 79  4e 6e 22 2c be 29 0d 00  |. g=."YyNn",.)..|
00000150  e6 0b 20 fd 20 67 3c 3e  30 0d 00 f0 11 20 e7 20  |.. . g<>0.... . |
00000160  67 3c 33 20 8c 20 8d 44  50 40 0d 00 fa 12 20 eb  |g<3 . .DP@.... .|
00000170  20 36 3a 20 f1 27 27 27  27 3a 20 e0 0d 01 04 05  | 6: .'''': .....|
00000180  20 0d 01 0e 23 f4 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  | ...#.**********|
00000190  2a 20 45 20 6e 20 64 20  2a 2a 2a 2a 2a 2a 2a 2a  |* E n d ********|
000001a0  2a 2a 2a 2a 0d 01 18 05  20 0d 01 22 23 f4 2a 2a  |****.... .."#.**|
000001b0  2a 20 53 20 75 20 62 20  72 20 6f 20 75 20 74 20  |* S u b r o u t |
000001c0  69 20 6e 20 65 20 73 20  2a 2a 2a 2a 0d 01 2c 05  |i n e s ****..,.|
000001d0  20 0d 01 36 14 dd 20 f2  70 6c 61 79 65 72 31 5f  | ..6.. .player1_|
000001e0  69 6e 70 75 74 0d 01 40  2b 20 f1 20 27 27 22 20  |input..@+ . ''" |
000001f0  20 20 20 20 20 20 20 41  4e 41 47 52 41 4d 53 20  |       ANAGRAMS |
00000200  46 4f 52 20 54 57 4f 20  50 4c 41 59 45 52 53 22  |FOR TWO PLAYERS"|
00000210  0d 01 4a 40 20 f1 20 27  27 22 50 6c 61 79 65 72  |..J@ . ''"Player|
00000220  20 31 2c 22 27 27 22 20  50 6c 65 61 73 65 20 74  | 1,"''" Please t|
00000230  79 70 65 20 69 6e 20 79  6f 75 72 20 77 6f 72 64  |ype in your word|
00000240  20 74 6f 20 62 65 20 73  68 75 66 66 6c 65 64 22  | to be shuffled"|
00000250  0d 01 54 13 20 f5 3a 20  e8 20 8a 30 2c 39 29 3b  |..T. .: . .0,9);|
00000260  77 24 3b 0d 01 5e 0d 20  fd 20 77 24 3c 3e 22 22  |w$;..^. . w$<>""|
00000270  0d 01 68 0a 20 63 24 3d  77 24 0d 01 72 2d 20 db  |..h. c$=w$..r- .|
00000280  3a f1 20 27 27 22 20 20  20 20 20 20 20 20 41 4e  |:. ''"        AN|
00000290  41 47 52 41 4d 53 20 46  4f 52 20 54 57 4f 20 50  |AGRAMS FOR TWO P|
000002a0  4c 41 59 45 52 53 22 0d  01 7c 05 e1 0d 01 86 05  |LAYERS"..|......|
000002b0  20 0d 01 90 13 dd 20 f2  73 68 75 66 66 6c 65 5f  | ..... .shuffle_|
000002c0  77 6f 72 64 0d 01 9a 11  20 e3 20 6b 3d 31 20 b8  |word.... . k=1 .|
000002d0  20 a9 20 63 24 0d 01 a4  0d 20 20 20 6c 3d a9 20  | . c$....   l=. |
000002e0  77 24 0d 01 ae 0d 20 20  20 6e 3d b3 28 6c 29 0d  |w$....   n=.(l).|
000002f0  01 b8 15 20 20 20 6a 24  3d 6a 24 2b c1 77 24 2c  |...   j$=j$+.w$,|
00000300  6e 2c 31 29 0d 01 c2 1f  20 20 20 77 24 3d c0 77  |n,1)....   w$=.w|
00000310  24 2c 6e 2d 31 29 2b c2  77 24 2c a9 28 77 24 29  |$,n-1)+.w$,.(w$)|
00000320  2d 6e 29 0d 01 cc 08 20  ed 20 6b 0d 01 d6 0d 20  |-n).... . k.... |
00000330  75 73 65 64 24 3d 6a 24  0d 01 e0 05 e1 0d 01 ea  |used$=j$........|
00000340  05 20 0d 01 f4 14 dd 20  f2 70 6c 61 79 65 72 32  |. ..... .player2|
00000350  5f 69 6e 70 75 74 0d 01  fe 13 20 fb 32 3a f1 20  |_input.... .2:. |
00000360  8a 31 30 2c 37 29 3b 6a  24 0d 02 08 4d 20 f1 20  |.10,7);j$...M . |
00000370  8a 30 2c 34 29 3b 22 50  6c 61 79 65 72 20 32 2c  |.0,4);"Player 2,|
00000380  20 67 75 65 73 73 20 6c  65 74 74 65 72 20 62 79  | guess letter by|
00000390  20 6c 65 74 74 65 72 2e  22 3a f1 20 8a 39 2c 39  | letter.":. .9,9|
000003a0  29 3b 22 57 68 61 74 20  6c 65 74 74 65 72 20 6e  |);"What letter n|
000003b0  65 78 74 20 3f 22 0d 02  12 0d 20 65 72 72 6f 72  |ext ?".... error|
000003c0  73 3d 30 0d 02 1c 11 20  e3 20 6e 3d 31 20 b8 20  |s=0.... . n=1 . |
000003d0  a9 20 63 24 0d 02 26 05  20 0d 02 30 08 20 20 20  |. c$..&. ..0.   |
000003e0  f5 0d 02 3a 11 20 20 20  20 f1 20 8a 32 37 2c 39  |...:.    . .27,9|
000003f0  29 3b 0d 02 44 19 20 20  20 20 67 24 3d be 3a fb  |);..D.    g$=.:.|
00000400  33 3a f1 20 22 20 22 3b  67 24 3b 0d 02 4e 1f 20  |3:. " ";g$;..N. |
00000410  20 20 20 e7 20 67 24 3c  3e c1 63 24 2c 6e 2c 31  |   . g$<>.c$,n,1|
00000420  29 20 8c 20 f2 77 72 6f  6e 67 0d 02 58 14 20 20  |) . .wrong..X.  |
00000430  20 fd 20 67 24 3d c1 63  24 2c 6e 2c 31 29 0d 02  | . g$=.c$,n,1)..|
00000440  62 05 20 0d 02 6c 0a 20  20 20 fb 20 32 0d 02 76  |b. ..l.   . 2..v|
00000450  14 20 20 20 f1 20 8a 39  2b 6e 2c 31 31 29 3b 67  |.   . .9+n,11);g|
00000460  24 0d 02 80 13 20 20 20  70 3d a7 75 73 65 64 24  |$....   p=.used$|
00000470  2c 67 24 29 0d 02 8a 0a  20 20 20 fb 20 31 0d 02  |,g$)....   . 1..|
00000480  94 13 20 20 20 f1 20 8a  39 2b 70 2c 37 29 3b 67  |..   . .9+p,7);g|
00000490  24 0d 02 9e 2f 20 20 20  75 73 65 64 24 3d c0 75  |$.../   used$=.u|
000004a0  73 65 64 24 2c 70 2d 31  29 2b 22 2a 22 2b c2 75  |sed$,p-1)+"*"+.u|
000004b0  73 65 64 24 2c a9 28 75  73 65 64 24 29 2d 70 29  |sed$,.(used$)-p)|
000004c0  0d 02 a8 12 20 20 20 d4  31 2c 2d 31 35 2c 35 30  |....   .1,-15,50|
000004d0  2c 32 0d 02 b2 08 20 ed  20 6e 0d 02 bc 05 e1 0d  |,2.... . n......|
000004e0  02 c6 05 20 0d 02 d0 0c  dd 20 f2 77 72 6f 6e 67  |... ..... .wrong|
000004f0  0d 02 da 29 20 e7 20 67  24 3e bd 33 31 20 80 20  |...) . g$>.31 . |
00000500  67 24 3c bd 31 32 37 20  8c 20 65 72 72 6f 72 73  |g$<.127 . errors|
00000510  3d 65 72 72 6f 72 73 2b  31 0d 02 e4 29 20 f1 20  |=errors+1...) . |
00000520  8a 31 30 2c 31 36 29 3b  22 4e 75 6d 62 65 72 20  |.10,16);"Number |
00000530  6f 66 20 65 72 72 6f 72  73 3d 22 3b 65 72 72 6f  |of errors=";erro|
00000540  72 73 0d 02 ee 11 20 d4  31 2c 2d 31 35 2c 31 35  |rs.... .1,-15,15|
00000550  30 2c 32 0d 02 f8 05 e1  0d 03 02 05 20 0d 03 0c  |0,2......... ...|
00000560  0e dd 20 f2 72 65 73 75  6c 74 73 0d 03 16 07 20  |.. .results.... |
00000570  fb 33 0d 03 20 20 20 f1  20 8a 31 31 2c 31 34 29  |.3..   . .11,14)|
00000580  3b 22 43 20 4f 20 52 20  52 20 45 20 43 20 54 20  |;"C O R R E C T |
00000590  21 22 0d 03 2a 17 20 f4  20 62 6c 61 63 6b 20 62  |!"..*. . black b|
000005a0  61 63 6b 67 72 6f 75 6e  64 0d 03 34 12 20 ef 31  |ackground..4. .1|
000005b0  39 2c 30 2c 30 2c 30 2c  30 2c 30 0d 03 3e 0f 20  |9,0,0,0,0,0..>. |
000005c0  e3 20 6e 3d 31 20 b8 20  32 30 0d 03 48 13 20 20  |. n=1 . 20..H.  |
000005d0  20 d4 31 2c 2d 31 35 2c  6e 2a 32 2c 32 0d 03 52  | .1,-15,n*2,2..R|
000005e0  10 20 20 20 e3 20 69 3d  31 20 b8 20 33 0d 03 5c  |.   . i=1 . 3..\|
000005f0  1a 20 20 20 20 ef 31 39  2c 69 2c b3 28 38 29 2d  |.    .19,i,.(8)-|
00000600  31 2c 30 2c 30 2c 30 0d  03 66 0a 20 20 20 ed 20  |1,0,0,0..f.   . |
00000610  69 0d 03 70 08 20 ed 20  6e 0d 03 7a 09 20 ef 20  |i..p. . n..z. . |
00000620  32 30 0d 03 84 29 20 f1  20 8a 31 30 2c 31 36 29  |20...) . .10,16)|
00000630  3b 22 4e 75 6d 62 65 72  20 6f 66 20 65 72 72 6f  |;"Number of erro|
00000640  72 73 3d 22 3b 65 72 72  6f 72 73 0d 03 8e 1b 20  |rs=";errors.... |
00000650  f1 20 8a 31 33 2c 31 38  29 3b 22 57 65 6c 6c 20  |. .13,18);"Well |
00000660  64 6f 6e 65 21 22 0d 03  98 05 e1 0d ff           |done!".......|
0000066d
Me+MyMicro/ANAGRAMS.m0
Me+MyMicro/ANAGRAMS.m1
Me+MyMicro/ANAGRAMS.m2
Me+MyMicro/ANAGRAMS.m4
Me+MyMicro/ANAGRAMS.m5