Home » Recent acquisitions » Acorn ADFS disks » adfs_ArchimedesWorld_199201.adf » January92 » !AWJan92/Goodies/ArcAut/Automatons/Demon
!AWJan92/Goodies/ArcAut/Automatons/Demon
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/Demon |
Read OK: | ✔ |
File size: | 03B5 bytes |
Load address: | 0000 |
Exec address: | 0000 |
File contents
AUTOMATON* Demon Devised by J E Connett, this produces regions of colour which grow out from an initial soup, eating up their surroundings & in time usually develop into spirals (called demons) which dominate the whole region. When prompted try 15 as the total numer of states. The Moore neighbourhood is used. A window 100x100 should be big enough to ensure spirals will form (by about generation 270). INITIALISATION* 10DEF PROCdo 20*SetEval wrap on 30INPUT '"number of states";n% 40OSCLI("SetEval n "+STR$n%) 50ENDPROC SCREEN* 10DEF PROCdo 20DIM buf% 256:SYS "OS_ReadVarVal","n",buf%,256 30PROCsoup(35,!buf%,1) 40ENDPROC CODE* ( READ_NEIG TM CELL - DUP 1 = IF (TM ==) [1-<n>] = IF (TM ==) ML CELL - DUP 1 = IF (ML ==) [1-<n>] = IF (ML ==) MR CELL - DUP 1 = IF (MR ==) [1-<n>] = IF (MR ==) BM CELL - DUP 1 = IF (BM ==) [1-<n>] = IF (BM ==) CELL == ) END*
00000000 41 55 54 4f 4d 41 54 4f 4e 2a 0a 0a 20 20 44 65 |AUTOMATON*.. De| 00000010 6d 6f 6e 0a 0a 20 20 44 65 76 69 73 65 64 20 62 |mon.. Devised b| 00000020 79 20 4a 20 45 20 43 6f 6e 6e 65 74 74 2c 20 74 |y J E Connett, t| 00000030 68 69 73 20 70 72 6f 64 75 63 65 73 20 72 65 67 |his produces reg| 00000040 69 6f 6e 73 20 6f 66 20 63 6f 6c 6f 75 72 20 77 |ions of colour w| 00000050 68 69 63 68 20 67 72 6f 77 20 6f 75 74 20 66 72 |hich grow out fr| 00000060 6f 6d 0a 20 20 61 6e 20 69 6e 69 74 69 61 6c 20 |om. an initial | 00000070 73 6f 75 70 2c 20 65 61 74 69 6e 67 20 75 70 20 |soup, eating up | 00000080 74 68 65 69 72 20 73 75 72 72 6f 75 6e 64 69 6e |their surroundin| 00000090 67 73 20 26 20 69 6e 20 74 69 6d 65 20 75 73 75 |gs & in time usu| 000000a0 61 6c 6c 79 20 64 65 76 65 6c 6f 70 0a 20 20 69 |ally develop. i| 000000b0 6e 74 6f 20 73 70 69 72 61 6c 73 20 28 63 61 6c |nto spirals (cal| 000000c0 6c 65 64 20 64 65 6d 6f 6e 73 29 20 77 68 69 63 |led demons) whic| 000000d0 68 20 64 6f 6d 69 6e 61 74 65 20 74 68 65 20 77 |h dominate the w| 000000e0 68 6f 6c 65 20 72 65 67 69 6f 6e 2e 20 57 68 65 |hole region. Whe| 000000f0 6e 20 70 72 6f 6d 70 74 65 64 0a 20 20 74 72 79 |n prompted. try| 00000100 20 31 35 20 61 73 20 74 68 65 20 74 6f 74 61 6c | 15 as the total| 00000110 20 6e 75 6d 65 72 20 6f 66 20 73 74 61 74 65 73 | numer of states| 00000120 2e 20 54 68 65 20 4d 6f 6f 72 65 20 6e 65 69 67 |. The Moore neig| 00000130 68 62 6f 75 72 68 6f 6f 64 20 69 73 20 75 73 65 |hbourhood is use| 00000140 64 2e 20 41 0a 20 20 77 69 6e 64 6f 77 20 31 30 |d. A. window 10| 00000150 30 78 31 30 30 20 73 68 6f 75 6c 64 20 62 65 20 |0x100 should be | 00000160 62 69 67 20 65 6e 6f 75 67 68 20 74 6f 20 65 6e |big enough to en| 00000170 73 75 72 65 20 73 70 69 72 61 6c 73 20 77 69 6c |sure spirals wil| 00000180 6c 20 66 6f 72 6d 20 28 62 79 20 61 62 6f 75 74 |l form (by about| 00000190 0a 20 20 67 65 6e 65 72 61 74 69 6f 6e 20 32 37 |. generation 27| 000001a0 30 29 2e 0a 0a 49 4e 49 54 49 41 4c 49 53 41 54 |0)...INITIALISAT| 000001b0 49 4f 4e 2a 0a 0a 20 20 31 30 44 45 46 20 50 52 |ION*.. 10DEF PR| 000001c0 4f 43 64 6f 0a 20 20 32 30 2a 53 65 74 45 76 61 |OCdo. 20*SetEva| 000001d0 6c 20 77 72 61 70 20 6f 6e 0a 20 20 33 30 49 4e |l wrap on. 30IN| 000001e0 50 55 54 20 27 22 6e 75 6d 62 65 72 20 6f 66 20 |PUT '"number of | 000001f0 73 74 61 74 65 73 22 3b 6e 25 0a 20 20 34 30 4f |states";n%. 40O| 00000200 53 43 4c 49 28 22 53 65 74 45 76 61 6c 20 6e 20 |SCLI("SetEval n | 00000210 22 2b 53 54 52 24 6e 25 29 0a 20 20 35 30 45 4e |"+STR$n%). 50EN| 00000220 44 50 52 4f 43 0a 0a 53 43 52 45 45 4e 2a 0a 0a |DPROC..SCREEN*..| 00000230 20 20 31 30 44 45 46 20 50 52 4f 43 64 6f 0a 20 | 10DEF PROCdo. | 00000240 20 32 30 44 49 4d 20 62 75 66 25 20 32 35 36 3a | 20DIM buf% 256:| 00000250 53 59 53 20 22 4f 53 5f 52 65 61 64 56 61 72 56 |SYS "OS_ReadVarV| 00000260 61 6c 22 2c 22 6e 22 2c 62 75 66 25 2c 32 35 36 |al","n",buf%,256| 00000270 0a 20 20 33 30 50 52 4f 43 73 6f 75 70 28 33 35 |. 30PROCsoup(35| 00000280 2c 21 62 75 66 25 2c 31 29 0a 20 20 34 30 45 4e |,!buf%,1). 40EN| 00000290 44 50 52 4f 43 0a 0a 43 4f 44 45 2a 0a 0a 28 20 |DPROC..CODE*..( | 000002a0 52 45 41 44 5f 4e 45 49 47 0a 20 20 54 4d 20 43 |READ_NEIG. TM C| 000002b0 45 4c 4c 20 2d 20 44 55 50 20 31 20 3d 20 49 46 |ELL - DUP 1 = IF| 000002c0 20 28 54 4d 20 3d 3d 29 20 5b 31 2d 3c 6e 3e 5d | (TM ==) [1-<n>]| 000002d0 20 3d 20 49 46 20 28 54 4d 20 3d 3d 29 0a 20 20 | = IF (TM ==). | 000002e0 4d 4c 20 43 45 4c 4c 20 2d 20 44 55 50 20 31 20 |ML CELL - DUP 1 | 000002f0 3d 20 49 46 20 28 4d 4c 20 3d 3d 29 20 5b 31 2d |= IF (ML ==) [1-| 00000300 3c 6e 3e 5d 20 3d 20 49 46 20 28 4d 4c 20 3d 3d |<n>] = IF (ML ==| 00000310 29 0a 20 20 4d 52 20 43 45 4c 4c 20 2d 20 44 55 |). MR CELL - DU| 00000320 50 20 31 20 3d 20 49 46 20 28 4d 52 20 3d 3d 29 |P 1 = IF (MR ==)| 00000330 20 5b 31 2d 3c 6e 3e 5d 20 3d 20 49 46 20 28 4d | [1-<n>] = IF (M| 00000340 52 20 3d 3d 29 0a 20 20 42 4d 20 43 45 4c 4c 20 |R ==). BM CELL | 00000350 2d 20 44 55 50 20 31 20 3d 20 49 46 20 28 42 4d |- DUP 1 = IF (BM| 00000360 20 3d 3d 29 20 5b 31 2d 3c 6e 3e 5d 20 3d 20 49 | ==) [1-<n>] = I| 00000370 46 20 28 42 4d 20 3d 3d 29 0a 20 20 43 45 4c 4c |F (BM ==). CELL| 00000380 20 3d 3d 20 20 20 20 20 20 20 20 20 20 20 20 20 | == | 00000390 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000003a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 29 0a | ).| 000003b0 0a 45 4e 44 2a |.END*| 000003b5