Home » Personal collection » Acorn ADFS disks » Electron » Finished_programs.ADF » Anagrams

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 » Finished_programs.ADF
Filename: Anagrams
Read OK:
File size: 0163 bytes
Load address: FFFF1D00
Exec address: FFFF8023
Duplicates

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

File contents
   10 INPUT"ANAGRAM",A$
   20 DIM SWAPS(LEN(A$))
   30 PRINT A$
   40 SWAP=LEN(A$)-1
   50 IF SWAPS(SWAP)=LEN(A$)-SWAP THEN SWAP=SWAP-1:GOTO50
   60 IF SWAP=0 THEN END
   70 PROCswap(SWAP)
   80 SWAPS(SWAP)=SWAPS(SWAP)+1:FOR ZERO=SWAP+1 TO LEN(A$):SWAPS(ZERO)=0:NEXT
   90 GOTO 30
  100 DEFPROCswap(SWAP)
  110 IF SWAP<LEN(A$)-2 THEN PROCswap(SWAP+2)
  120 A$=MID$(A$,1,SWAP-1)+MID$(A$,LEN(A$),1)+MID$(A$,SWAP+1,LEN(A$)-SWAP-1)+MID$(A$,SWAP,1)
  130 ENDPROC

 �"ANAGRAM",A$
 � SWAPS(�(A$))
	 � A$
( SWAP=�(A$)-1
21 � SWAPS(SWAP)=�(A$)-SWAP � SWAP=SWAP-1:�Tr@
< � SWAP=0 � �
F �swap(SWAP)
PD SWAPS(SWAP)=SWAPS(SWAP)+1:� ZERO=SWAP+1 � �(A$):SWAPS(ZERO)=0:�
Z � �T^@
d ��swap(SWAP)
n# � SWAP<�(A$)-2 � �swap(SWAP+2)
xG A$=�A$,1,SWAP-1)+�A$,�(A$),1)+�A$,SWAP+1,�(A$)-SWAP-1)+�A$,SWAP,1)
� �
�
00000000  0d 00 0a 12 20 e8 22 41  4e 41 47 52 41 4d 22 2c  |.... ."ANAGRAM",|
00000010  41 24 0d 00 14 13 20 de  20 53 57 41 50 53 28 a9  |A$.... . SWAPS(.|
00000020  28 41 24 29 29 0d 00 1e  09 20 f1 20 41 24 0d 00  |(A$)).... . A$..|
00000030  28 11 20 53 57 41 50 3d  a9 28 41 24 29 2d 31 0d  |(. SWAP=.(A$)-1.|
00000040  00 32 31 20 e7 20 53 57  41 50 53 28 53 57 41 50  |.21 . SWAPS(SWAP|
00000050  29 3d a9 28 41 24 29 2d  53 57 41 50 20 8c 20 53  |)=.(A$)-SWAP . S|
00000060  57 41 50 3d 53 57 41 50  2d 31 3a e5 8d 54 72 40  |WAP=SWAP-1:..Tr@|
00000070  0d 00 3c 11 20 e7 20 53  57 41 50 3d 30 20 8c 20  |..<. . SWAP=0 . |
00000080  e0 0d 00 46 10 20 f2 73  77 61 70 28 53 57 41 50  |...F. .swap(SWAP|
00000090  29 0d 00 50 44 20 53 57  41 50 53 28 53 57 41 50  |)..PD SWAPS(SWAP|
000000a0  29 3d 53 57 41 50 53 28  53 57 41 50 29 2b 31 3a  |)=SWAPS(SWAP)+1:|
000000b0  e3 20 5a 45 52 4f 3d 53  57 41 50 2b 31 20 b8 20  |. ZERO=SWAP+1 . |
000000c0  a9 28 41 24 29 3a 53 57  41 50 53 28 5a 45 52 4f  |.(A$):SWAPS(ZERO|
000000d0  29 3d 30 3a ed 0d 00 5a  0b 20 e5 20 8d 54 5e 40  |)=0:...Z. . .T^@|
000000e0  0d 00 64 11 20 dd f2 73  77 61 70 28 53 57 41 50  |..d. ..swap(SWAP|
000000f0  29 0d 00 6e 23 20 e7 20  53 57 41 50 3c a9 28 41  |)..n# . SWAP<.(A|
00000100  24 29 2d 32 20 8c 20 f2  73 77 61 70 28 53 57 41  |$)-2 . .swap(SWA|
00000110  50 2b 32 29 0d 00 78 47  20 41 24 3d c1 41 24 2c  |P+2)..xG A$=.A$,|
00000120  31 2c 53 57 41 50 2d 31  29 2b c1 41 24 2c a9 28  |1,SWAP-1)+.A$,.(|
00000130  41 24 29 2c 31 29 2b c1  41 24 2c 53 57 41 50 2b  |A$),1)+.A$,SWAP+|
00000140  31 2c a9 28 41 24 29 2d  53 57 41 50 2d 31 29 2b  |1,.(A$)-SWAP-1)+|
00000150  c1 41 24 2c 53 57 41 50  2c 31 29 0d 00 82 06 20  |.A$,SWAP,1).... |
00000160  e1 0d ff                                          |...|
00000163
Anagrams.m0
Anagrams.m1
Anagrams.m2
Anagrams.m4
Anagrams.m5