Home » Recent acquisitions » Acorn ADFS disks » adfs_ArchimedesWorld_199201.adf » January92 » !AWJan92/Goodies/ArcAut/Automatons/Fawkes

!AWJan92/Goodies/ArcAut/Automatons/Fawkes

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 » Recent acquisitions » Acorn ADFS disks » adfs_ArchimedesWorld_199201.adf » January92
Filename: !AWJan92/Goodies/ArcAut/Automatons/Fawkes
Read OK:
File size: 01F6 bytes
Load address: 0000
Exec address: 0000
File contents
AUTOMATON*

  Fawkes

  A 256 state automaton using the Moore neighbourhood. Each cell is replaced
  by the average of it's eight neighbours, either incremented or decremented
  by one depending on whether the original cell has even or odd state. Try
  100x50 for the window size.

INITIALISATION*

  10DEF PROCdo
  20*SetEval wrap on
  30ENDPROC

SCREEN*

  10DEF PROCdo
  20PROCsoup(0,256,1)
  30ENDPROC

CODE*

( READ_NEIG
  SUM_NEIG  3 >>
  CELL 1 AND  IF (1 - ==)
            ELSE (1 + ==) )

END*
00000000  41 55 54 4f 4d 41 54 4f  4e 2a 0a 0a 20 20 46 61  |AUTOMATON*..  Fa|
00000010  77 6b 65 73 0a 0a 20 20  41 20 32 35 36 20 73 74  |wkes..  A 256 st|
00000020  61 74 65 20 61 75 74 6f  6d 61 74 6f 6e 20 75 73  |ate automaton us|
00000030  69 6e 67 20 74 68 65 20  4d 6f 6f 72 65 20 6e 65  |ing the Moore ne|
00000040  69 67 68 62 6f 75 72 68  6f 6f 64 2e 20 45 61 63  |ighbourhood. Eac|
00000050  68 20 63 65 6c 6c 20 69  73 20 72 65 70 6c 61 63  |h cell is replac|
00000060  65 64 0a 20 20 62 79 20  74 68 65 20 61 76 65 72  |ed.  by the aver|
00000070  61 67 65 20 6f 66 20 69  74 27 73 20 65 69 67 68  |age of it's eigh|
00000080  74 20 6e 65 69 67 68 62  6f 75 72 73 2c 20 65 69  |t neighbours, ei|
00000090  74 68 65 72 20 69 6e 63  72 65 6d 65 6e 74 65 64  |ther incremented|
000000a0  20 6f 72 20 64 65 63 72  65 6d 65 6e 74 65 64 0a  | or decremented.|
000000b0  20 20 62 79 20 6f 6e 65  20 64 65 70 65 6e 64 69  |  by one dependi|
000000c0  6e 67 20 6f 6e 20 77 68  65 74 68 65 72 20 74 68  |ng on whether th|
000000d0  65 20 6f 72 69 67 69 6e  61 6c 20 63 65 6c 6c 20  |e original cell |
000000e0  68 61 73 20 65 76 65 6e  20 6f 72 20 6f 64 64 20  |has even or odd |
000000f0  73 74 61 74 65 2e 20 54  72 79 0a 20 20 31 30 30  |state. Try.  100|
00000100  78 35 30 20 66 6f 72 20  74 68 65 20 77 69 6e 64  |x50 for the wind|
00000110  6f 77 20 73 69 7a 65 2e  0a 0a 49 4e 49 54 49 41  |ow size...INITIA|
00000120  4c 49 53 41 54 49 4f 4e  2a 0a 0a 20 20 31 30 44  |LISATION*..  10D|
00000130  45 46 20 50 52 4f 43 64  6f 0a 20 20 32 30 2a 53  |EF PROCdo.  20*S|
00000140  65 74 45 76 61 6c 20 77  72 61 70 20 6f 6e 0a 20  |etEval wrap on. |
00000150  20 33 30 45 4e 44 50 52  4f 43 0a 0a 53 43 52 45  | 30ENDPROC..SCRE|
00000160  45 4e 2a 0a 0a 20 20 31  30 44 45 46 20 50 52 4f  |EN*..  10DEF PRO|
00000170  43 64 6f 0a 20 20 32 30  50 52 4f 43 73 6f 75 70  |Cdo.  20PROCsoup|
00000180  28 30 2c 32 35 36 2c 31  29 0a 20 20 33 30 45 4e  |(0,256,1).  30EN|
00000190  44 50 52 4f 43 0a 0a 43  4f 44 45 2a 0a 0a 28 20  |DPROC..CODE*..( |
000001a0  52 45 41 44 5f 4e 45 49  47 0a 20 20 53 55 4d 5f  |READ_NEIG.  SUM_|
000001b0  4e 45 49 47 20 20 33 20  3e 3e 0a 20 20 43 45 4c  |NEIG  3 >>.  CEL|
000001c0  4c 20 31 20 41 4e 44 20  20 49 46 20 28 31 20 2d  |L 1 AND  IF (1 -|
000001d0  20 3d 3d 29 0a 20 20 20  20 20 20 20 20 20 20 20  | ==).           |
000001e0  20 45 4c 53 45 20 28 31  20 2b 20 3d 3d 29 20 29  | ELSE (1 + ==) )|
000001f0  0a 0a 45 4e 44 2a                                 |..END*|
000001f6