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

!AWJan92/Goodies/ArcAut/!ArcAut/!Help

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/!ArcAut/!Help
Read OK:
File size: 0905 bytes
Load address: 0000
Exec address: 0000
File contents
 ArcAut is a cellular automaton laboratory for the Archimedes; see the
instructions for a general description of cellular automata.

 ArcAut permits saving & loading of screens. It expects to find a directory
called 'Screens' within the directory in which !ArcAut is held, for the
storage of these.

 Automaton code is held in a text file. It can be executed by either dragging
from a filer window, or from a save dialogue box such as in !Edit, onto the
ArcAut icon on the icon bar. The code for an automaton has the following
syntax:

AUTOMATON*
<name>
INITIALISATION*
<basic1>
SCREEN*
<basic2>
CODE*
<code>
END*

 Where basic1 is a BASIC routine defining initialisation of any parameters
required by the automaton; these should be passed using system variables; &
basic2 sets up the screen for the first generation. The routines are
executed via a call to PROCdo, thus they should be enclosed within a
definition of this procedure. They may call other FNs/PROCs. It is
recommended that both these sections of Basic code use line numbers greater
than 9. Note that the last line in each section of Basic code must terminate
with at least one carriage return (or CHR$10).
 A library of useful procedures & functions common to many automatons is
provided (called 'Library', stored in !ArcAut); these may be referred to
without further definition & are always present (they may also be extended).
 Inclusion of common machine code routines is possible by appending them to
the file 'Code' in !ArcAut. They may be accessed via their offset within the
code using the pointer to the start address held in the Basic variable
'code%'. Any such routines are also always present. See the instructions or
examples for details of current routines provided.
 'code' describes the actual rules defining the automaton. This should begin
with a '(' character, and terminate with a ')'. The rules are composed of
elementary arithmetic & logical operators, a few commands, & a single means
of conditional execution of differing parts of the code, all communicating
via a very small stack using reverse polish notation. See the instructions
or examples for details of this simple language. Note that additional spaces
& carriage returns may be freely used between instructions to aid
legibility; they will be ignored by ArcAut.
00000000  0a 20 41 72 63 41 75 74  20 69 73 20 61 20 63 65  |. ArcAut is a ce|
00000010  6c 6c 75 6c 61 72 20 61  75 74 6f 6d 61 74 6f 6e  |llular automaton|
00000020  20 6c 61 62 6f 72 61 74  6f 72 79 20 66 6f 72 20  | laboratory for |
00000030  74 68 65 20 41 72 63 68  69 6d 65 64 65 73 3b 20  |the Archimedes; |
00000040  73 65 65 20 74 68 65 0a  69 6e 73 74 72 75 63 74  |see the.instruct|
00000050  69 6f 6e 73 20 66 6f 72  20 61 20 67 65 6e 65 72  |ions for a gener|
00000060  61 6c 20 64 65 73 63 72  69 70 74 69 6f 6e 20 6f  |al description o|
00000070  66 20 63 65 6c 6c 75 6c  61 72 20 61 75 74 6f 6d  |f cellular autom|
00000080  61 74 61 2e 0a 0a 20 41  72 63 41 75 74 20 70 65  |ata... ArcAut pe|
00000090  72 6d 69 74 73 20 73 61  76 69 6e 67 20 26 20 6c  |rmits saving & l|
000000a0  6f 61 64 69 6e 67 20 6f  66 20 73 63 72 65 65 6e  |oading of screen|
000000b0  73 2e 20 49 74 20 65 78  70 65 63 74 73 20 74 6f  |s. It expects to|
000000c0  20 66 69 6e 64 20 61 20  64 69 72 65 63 74 6f 72  | find a director|
000000d0  79 0a 63 61 6c 6c 65 64  20 27 53 63 72 65 65 6e  |y.called 'Screen|
000000e0  73 27 20 77 69 74 68 69  6e 20 74 68 65 20 64 69  |s' within the di|
000000f0  72 65 63 74 6f 72 79 20  69 6e 20 77 68 69 63 68  |rectory in which|
00000100  20 21 41 72 63 41 75 74  20 69 73 20 68 65 6c 64  | !ArcAut is held|
00000110  2c 20 66 6f 72 20 74 68  65 0a 73 74 6f 72 61 67  |, for the.storag|
00000120  65 20 6f 66 20 74 68 65  73 65 2e 0a 0a 20 41 75  |e of these... Au|
00000130  74 6f 6d 61 74 6f 6e 20  63 6f 64 65 20 69 73 20  |tomaton code is |
00000140  68 65 6c 64 20 69 6e 20  61 20 74 65 78 74 20 66  |held in a text f|
00000150  69 6c 65 2e 20 49 74 20  63 61 6e 20 62 65 20 65  |ile. It can be e|
00000160  78 65 63 75 74 65 64 20  62 79 20 65 69 74 68 65  |xecuted by eithe|
00000170  72 20 64 72 61 67 67 69  6e 67 0a 66 72 6f 6d 20  |r dragging.from |
00000180  61 20 66 69 6c 65 72 20  77 69 6e 64 6f 77 2c 20  |a filer window, |
00000190  6f 72 20 66 72 6f 6d 20  61 20 73 61 76 65 20 64  |or from a save d|
000001a0  69 61 6c 6f 67 75 65 20  62 6f 78 20 73 75 63 68  |ialogue box such|
000001b0  20 61 73 20 69 6e 20 21  45 64 69 74 2c 20 6f 6e  | as in !Edit, on|
000001c0  74 6f 20 74 68 65 0a 41  72 63 41 75 74 20 69 63  |to the.ArcAut ic|
000001d0  6f 6e 20 6f 6e 20 74 68  65 20 69 63 6f 6e 20 62  |on on the icon b|
000001e0  61 72 2e 20 54 68 65 20  63 6f 64 65 20 66 6f 72  |ar. The code for|
000001f0  20 61 6e 20 61 75 74 6f  6d 61 74 6f 6e 20 68 61  | an automaton ha|
00000200  73 20 74 68 65 20 66 6f  6c 6c 6f 77 69 6e 67 0a  |s the following.|
00000210  73 79 6e 74 61 78 3a 0a  0a 41 55 54 4f 4d 41 54  |syntax:..AUTOMAT|
00000220  4f 4e 2a 0a 3c 6e 61 6d  65 3e 0a 49 4e 49 54 49  |ON*.<name>.INITI|
00000230  41 4c 49 53 41 54 49 4f  4e 2a 0a 3c 62 61 73 69  |ALISATION*.<basi|
00000240  63 31 3e 0a 53 43 52 45  45 4e 2a 0a 3c 62 61 73  |c1>.SCREEN*.<bas|
00000250  69 63 32 3e 0a 43 4f 44  45 2a 0a 3c 63 6f 64 65  |ic2>.CODE*.<code|
00000260  3e 0a 45 4e 44 2a 0a 0a  20 57 68 65 72 65 20 62  |>.END*.. Where b|
00000270  61 73 69 63 31 20 69 73  20 61 20 42 41 53 49 43  |asic1 is a BASIC|
00000280  20 72 6f 75 74 69 6e 65  20 64 65 66 69 6e 69 6e  | routine definin|
00000290  67 20 69 6e 69 74 69 61  6c 69 73 61 74 69 6f 6e  |g initialisation|
000002a0  20 6f 66 20 61 6e 79 20  70 61 72 61 6d 65 74 65  | of any paramete|
000002b0  72 73 0a 72 65 71 75 69  72 65 64 20 62 79 20 74  |rs.required by t|
000002c0  68 65 20 61 75 74 6f 6d  61 74 6f 6e 3b 20 74 68  |he automaton; th|
000002d0  65 73 65 20 73 68 6f 75  6c 64 20 62 65 20 70 61  |ese should be pa|
000002e0  73 73 65 64 20 75 73 69  6e 67 20 73 79 73 74 65  |ssed using syste|
000002f0  6d 20 76 61 72 69 61 62  6c 65 73 3b 20 26 0a 62  |m variables; &.b|
00000300  61 73 69 63 32 20 73 65  74 73 20 75 70 20 74 68  |asic2 sets up th|
00000310  65 20 73 63 72 65 65 6e  20 66 6f 72 20 74 68 65  |e screen for the|
00000320  20 66 69 72 73 74 20 67  65 6e 65 72 61 74 69 6f  | first generatio|
00000330  6e 2e 20 54 68 65 20 72  6f 75 74 69 6e 65 73 20  |n. The routines |
00000340  61 72 65 0a 65 78 65 63  75 74 65 64 20 76 69 61  |are.executed via|
00000350  20 61 20 63 61 6c 6c 20  74 6f 20 50 52 4f 43 64  | a call to PROCd|
00000360  6f 2c 20 74 68 75 73 20  74 68 65 79 20 73 68 6f  |o, thus they sho|
00000370  75 6c 64 20 62 65 20 65  6e 63 6c 6f 73 65 64 20  |uld be enclosed |
00000380  77 69 74 68 69 6e 20 61  0a 64 65 66 69 6e 69 74  |within a.definit|
00000390  69 6f 6e 20 6f 66 20 74  68 69 73 20 70 72 6f 63  |ion of this proc|
000003a0  65 64 75 72 65 2e 20 54  68 65 79 20 6d 61 79 20  |edure. They may |
000003b0  63 61 6c 6c 20 6f 74 68  65 72 20 46 4e 73 2f 50  |call other FNs/P|
000003c0  52 4f 43 73 2e 20 49 74  20 69 73 0a 72 65 63 6f  |ROCs. It is.reco|
000003d0  6d 6d 65 6e 64 65 64 20  74 68 61 74 20 62 6f 74  |mmended that bot|
000003e0  68 20 74 68 65 73 65 20  73 65 63 74 69 6f 6e 73  |h these sections|
000003f0  20 6f 66 20 42 61 73 69  63 20 63 6f 64 65 20 75  | of Basic code u|
00000400  73 65 20 6c 69 6e 65 20  6e 75 6d 62 65 72 73 20  |se line numbers |
00000410  67 72 65 61 74 65 72 0a  74 68 61 6e 20 39 2e 20  |greater.than 9. |
00000420  4e 6f 74 65 20 74 68 61  74 20 74 68 65 20 6c 61  |Note that the la|
00000430  73 74 20 6c 69 6e 65 20  69 6e 20 65 61 63 68 20  |st line in each |
00000440  73 65 63 74 69 6f 6e 20  6f 66 20 42 61 73 69 63  |section of Basic|
00000450  20 63 6f 64 65 20 6d 75  73 74 20 74 65 72 6d 69  | code must termi|
00000460  6e 61 74 65 0a 77 69 74  68 20 61 74 20 6c 65 61  |nate.with at lea|
00000470  73 74 20 6f 6e 65 20 63  61 72 72 69 61 67 65 20  |st one carriage |
00000480  72 65 74 75 72 6e 20 28  6f 72 20 43 48 52 24 31  |return (or CHR$1|
00000490  30 29 2e 0a 20 41 20 6c  69 62 72 61 72 79 20 6f  |0).. A library o|
000004a0  66 20 75 73 65 66 75 6c  20 70 72 6f 63 65 64 75  |f useful procedu|
000004b0  72 65 73 20 26 20 66 75  6e 63 74 69 6f 6e 73 20  |res & functions |
000004c0  63 6f 6d 6d 6f 6e 20 74  6f 20 6d 61 6e 79 20 61  |common to many a|
000004d0  75 74 6f 6d 61 74 6f 6e  73 20 69 73 0a 70 72 6f  |utomatons is.pro|
000004e0  76 69 64 65 64 20 28 63  61 6c 6c 65 64 20 27 4c  |vided (called 'L|
000004f0  69 62 72 61 72 79 27 2c  20 73 74 6f 72 65 64 20  |ibrary', stored |
00000500  69 6e 20 21 41 72 63 41  75 74 29 3b 20 74 68 65  |in !ArcAut); the|
00000510  73 65 20 6d 61 79 20 62  65 20 72 65 66 65 72 72  |se may be referr|
00000520  65 64 20 74 6f 0a 77 69  74 68 6f 75 74 20 66 75  |ed to.without fu|
00000530  72 74 68 65 72 20 64 65  66 69 6e 69 74 69 6f 6e  |rther definition|
00000540  20 26 20 61 72 65 20 61  6c 77 61 79 73 20 70 72  | & are always pr|
00000550  65 73 65 6e 74 20 28 74  68 65 79 20 6d 61 79 20  |esent (they may |
00000560  61 6c 73 6f 20 62 65 20  65 78 74 65 6e 64 65 64  |also be extended|
00000570  29 2e 0a 20 49 6e 63 6c  75 73 69 6f 6e 20 6f 66  |).. Inclusion of|
00000580  20 63 6f 6d 6d 6f 6e 20  6d 61 63 68 69 6e 65 20  | common machine |
00000590  63 6f 64 65 20 72 6f 75  74 69 6e 65 73 20 69 73  |code routines is|
000005a0  20 70 6f 73 73 69 62 6c  65 20 62 79 20 61 70 70  | possible by app|
000005b0  65 6e 64 69 6e 67 20 74  68 65 6d 20 74 6f 0a 74  |ending them to.t|
000005c0  68 65 20 66 69 6c 65 20  27 43 6f 64 65 27 20 69  |he file 'Code' i|
000005d0  6e 20 21 41 72 63 41 75  74 2e 20 54 68 65 79 20  |n !ArcAut. They |
000005e0  6d 61 79 20 62 65 20 61  63 63 65 73 73 65 64 20  |may be accessed |
000005f0  76 69 61 20 74 68 65 69  72 20 6f 66 66 73 65 74  |via their offset|
00000600  20 77 69 74 68 69 6e 20  74 68 65 0a 63 6f 64 65  | within the.code|
00000610  20 75 73 69 6e 67 20 74  68 65 20 70 6f 69 6e 74  | using the point|
00000620  65 72 20 74 6f 20 74 68  65 20 73 74 61 72 74 20  |er to the start |
00000630  61 64 64 72 65 73 73 20  68 65 6c 64 20 69 6e 20  |address held in |
00000640  74 68 65 20 42 61 73 69  63 20 76 61 72 69 61 62  |the Basic variab|
00000650  6c 65 0a 27 63 6f 64 65  25 27 2e 20 41 6e 79 20  |le.'code%'. Any |
00000660  73 75 63 68 20 72 6f 75  74 69 6e 65 73 20 61 72  |such routines ar|
00000670  65 20 61 6c 73 6f 20 61  6c 77 61 79 73 20 70 72  |e also always pr|
00000680  65 73 65 6e 74 2e 20 53  65 65 20 74 68 65 20 69  |esent. See the i|
00000690  6e 73 74 72 75 63 74 69  6f 6e 73 20 6f 72 0a 65  |nstructions or.e|
000006a0  78 61 6d 70 6c 65 73 20  66 6f 72 20 64 65 74 61  |xamples for deta|
000006b0  69 6c 73 20 6f 66 20 63  75 72 72 65 6e 74 20 72  |ils of current r|
000006c0  6f 75 74 69 6e 65 73 20  70 72 6f 76 69 64 65 64  |outines provided|
000006d0  2e 0a 20 27 63 6f 64 65  27 20 64 65 73 63 72 69  |.. 'code' descri|
000006e0  62 65 73 20 74 68 65 20  61 63 74 75 61 6c 20 72  |bes the actual r|
000006f0  75 6c 65 73 20 64 65 66  69 6e 69 6e 67 20 74 68  |ules defining th|
00000700  65 20 61 75 74 6f 6d 61  74 6f 6e 2e 20 54 68 69  |e automaton. Thi|
00000710  73 20 73 68 6f 75 6c 64  20 62 65 67 69 6e 0a 77  |s should begin.w|
00000720  69 74 68 20 61 20 27 28  27 20 63 68 61 72 61 63  |ith a '(' charac|
00000730  74 65 72 2c 20 61 6e 64  20 74 65 72 6d 69 6e 61  |ter, and termina|
00000740  74 65 20 77 69 74 68 20  61 20 27 29 27 2e 20 54  |te with a ')'. T|
00000750  68 65 20 72 75 6c 65 73  20 61 72 65 20 63 6f 6d  |he rules are com|
00000760  70 6f 73 65 64 20 6f 66  0a 65 6c 65 6d 65 6e 74  |posed of.element|
00000770  61 72 79 20 61 72 69 74  68 6d 65 74 69 63 20 26  |ary arithmetic &|
00000780  20 6c 6f 67 69 63 61 6c  20 6f 70 65 72 61 74 6f  | logical operato|
00000790  72 73 2c 20 61 20 66 65  77 20 63 6f 6d 6d 61 6e  |rs, a few comman|
000007a0  64 73 2c 20 26 20 61 20  73 69 6e 67 6c 65 20 6d  |ds, & a single m|
000007b0  65 61 6e 73 0a 6f 66 20  63 6f 6e 64 69 74 69 6f  |eans.of conditio|
000007c0  6e 61 6c 20 65 78 65 63  75 74 69 6f 6e 20 6f 66  |nal execution of|
000007d0  20 64 69 66 66 65 72 69  6e 67 20 70 61 72 74 73  | differing parts|
000007e0  20 6f 66 20 74 68 65 20  63 6f 64 65 2c 20 61 6c  | of the code, al|
000007f0  6c 20 63 6f 6d 6d 75 6e  69 63 61 74 69 6e 67 0a  |l communicating.|
00000800  76 69 61 20 61 20 76 65  72 79 20 73 6d 61 6c 6c  |via a very small|
00000810  20 73 74 61 63 6b 20 75  73 69 6e 67 20 72 65 76  | stack using rev|
00000820  65 72 73 65 20 70 6f 6c  69 73 68 20 6e 6f 74 61  |erse polish nota|
00000830  74 69 6f 6e 2e 20 53 65  65 20 74 68 65 20 69 6e  |tion. See the in|
00000840  73 74 72 75 63 74 69 6f  6e 73 0a 6f 72 20 65 78  |structions.or ex|
00000850  61 6d 70 6c 65 73 20 66  6f 72 20 64 65 74 61 69  |amples for detai|
00000860  6c 73 20 6f 66 20 74 68  69 73 20 73 69 6d 70 6c  |ls of this simpl|
00000870  65 20 6c 61 6e 67 75 61  67 65 2e 20 4e 6f 74 65  |e language. Note|
00000880  20 74 68 61 74 20 61 64  64 69 74 69 6f 6e 61 6c  | that additional|
00000890  20 73 70 61 63 65 73 0a  26 20 63 61 72 72 69 61  | spaces.& carria|
000008a0  67 65 20 72 65 74 75 72  6e 73 20 6d 61 79 20 62  |ge returns may b|
000008b0  65 20 66 72 65 65 6c 79  20 75 73 65 64 20 62 65  |e freely used be|
000008c0  74 77 65 65 6e 20 69 6e  73 74 72 75 63 74 69 6f  |tween instructio|
000008d0  6e 73 20 74 6f 20 61 69  64 0a 6c 65 67 69 62 69  |ns to aid.legibi|
000008e0  6c 69 74 79 3b 20 74 68  65 79 20 77 69 6c 6c 20  |lity; they will |
000008f0  62 65 20 69 67 6e 6f 72  65 64 20 62 79 20 41 72  |be ignored by Ar|
00000900  63 41 75 74 2e                                    |cAut.|
00000905