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

!AWJan92/Goodies/ArcAut/Automatons/Parity

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/Parity
Read OK:
File size: 01AF bytes
Load address: 0000
Exec address: 0000
File contents
AUTOMATON*

  Parity

  Similar to 'Forget Me Not', this is a two state Moore neighbourhood
  automaton. It was devised by Edward Fredkin.

INITIALISATION*

  10DEF PROCdo
  20*SetEval wrap on
  30ENDPROC

SCREEN*

  10DEF PROCdo
  20DIM buf% 256:SYS "OS_ReadVarVal","sux",buf%,256
  30k%=RND(!buf%)
  40GCOL 63 TINT 255:RECTANGLE FILL -k%/2,-k%/2,k%,k%
  50ENDPROC

CODE*

( READ_NEIG
  CELL TM EOR BM EOR ML EOR MR EOR == )

END*
00000000  41 55 54 4f 4d 41 54 4f  4e 2a 0a 0a 20 20 50 61  |AUTOMATON*..  Pa|
00000010  72 69 74 79 0a 0a 20 20  53 69 6d 69 6c 61 72 20  |rity..  Similar |
00000020  74 6f 20 27 46 6f 72 67  65 74 20 4d 65 20 4e 6f  |to 'Forget Me No|
00000030  74 27 2c 20 74 68 69 73  20 69 73 20 61 20 74 77  |t', this is a tw|
00000040  6f 20 73 74 61 74 65 20  4d 6f 6f 72 65 20 6e 65  |o state Moore ne|
00000050  69 67 68 62 6f 75 72 68  6f 6f 64 0a 20 20 61 75  |ighbourhood.  au|
00000060  74 6f 6d 61 74 6f 6e 2e  20 49 74 20 77 61 73 20  |tomaton. It was |
00000070  64 65 76 69 73 65 64 20  62 79 20 45 64 77 61 72  |devised by Edwar|
00000080  64 20 46 72 65 64 6b 69  6e 2e 0a 0a 49 4e 49 54  |d Fredkin...INIT|
00000090  49 41 4c 49 53 41 54 49  4f 4e 2a 0a 0a 20 20 31  |IALISATION*..  1|
000000a0  30 44 45 46 20 50 52 4f  43 64 6f 0a 20 20 32 30  |0DEF PROCdo.  20|
000000b0  2a 53 65 74 45 76 61 6c  20 77 72 61 70 20 6f 6e  |*SetEval wrap on|
000000c0  0a 20 20 33 30 45 4e 44  50 52 4f 43 0a 0a 53 43  |.  30ENDPROC..SC|
000000d0  52 45 45 4e 2a 0a 0a 20  20 31 30 44 45 46 20 50  |REEN*..  10DEF P|
000000e0  52 4f 43 64 6f 0a 20 20  32 30 44 49 4d 20 62 75  |ROCdo.  20DIM bu|
000000f0  66 25 20 32 35 36 3a 53  59 53 20 22 4f 53 5f 52  |f% 256:SYS "OS_R|
00000100  65 61 64 56 61 72 56 61  6c 22 2c 22 73 75 78 22  |eadVarVal","sux"|
00000110  2c 62 75 66 25 2c 32 35  36 0a 20 20 33 30 6b 25  |,buf%,256.  30k%|
00000120  3d 52 4e 44 28 21 62 75  66 25 29 0a 20 20 34 30  |=RND(!buf%).  40|
00000130  47 43 4f 4c 20 36 33 20  54 49 4e 54 20 32 35 35  |GCOL 63 TINT 255|
00000140  3a 52 45 43 54 41 4e 47  4c 45 20 46 49 4c 4c 20  |:RECTANGLE FILL |
00000150  2d 6b 25 2f 32 2c 2d 6b  25 2f 32 2c 6b 25 2c 6b  |-k%/2,-k%/2,k%,k|
00000160  25 0a 20 20 35 30 45 4e  44 50 52 4f 43 0a 0a 43  |%.  50ENDPROC..C|
00000170  4f 44 45 2a 0a 0a 28 20  52 45 41 44 5f 4e 45 49  |ODE*..( READ_NEI|
00000180  47 0a 20 20 43 45 4c 4c  20 54 4d 20 45 4f 52 20  |G.  CELL TM EOR |
00000190  42 4d 20 45 4f 52 20 4d  4c 20 45 4f 52 20 4d 52  |BM EOR ML EOR MR|
000001a0  20 45 4f 52 20 3d 3d 20  29 0a 0a 45 4e 44 2a     | EOR == )..END*|
000001af