Home » Archimedes archive » Archimedes World » AW-1992-03.adf » AWMar92 » !AWMar92/Goodies/ArcAut/Info/Table5

!AWMar92/Goodies/ArcAut/Info/Table5

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 » Archimedes archive » Archimedes World » AW-1992-03.adf » AWMar92
Filename: !AWMar92/Goodies/ArcAut/Info/Table5
Read OK:
File size: 0C5F bytes
Load address: 0000
Exec address: 0000
File contents
  TABLE 5: The initialisation & screen set-up Library


  Note: the system variables sux & suy hold the CA universe width & height; you may find these useful when setting up the screen.


  Name of Procedure/Function      Purpose

          PROCsoup(s%,n%,p)       fills the automaton universe randomly with colours whose actual values range from
                                  s% to s%+n%-1; note, these values are as stored in screen memory, not GCOL numbers.
                                  p is the probability that an arbitrary cell will have it's contents overwritten by a new
                                  randomly selected value.
                                  Thus PROCsoup(0,256,1) fills the window randomly with colours from the whole range,
                                  while PROCsoup(255,1,.1) will scatter white cells over about ten percent of the background.

          PROCload                prompts the user for the filename of a previously saved screen, & then loads it into the
                                  CA window. Note, screens are stored in a directory called 'Screens' which should be present
                                  in the same directory that contains !ArcAut; ArcAut expects this to exist, when saving &
                                  loading screens, so you should ensure the directory is present, even if empty.

          PROCmouseon             initialises the pointer & restricts it to the window containing the CA universe; this procedure
                                  expects the variables sux% & suy% to hold the width & height of the window; you must set these
                                  up by reading the values stored in the system variables sux & suy; see for example
                                  the automaton 'Wire'.

          PROCcursors(x%,y%)      returns in x% & y% values according to which cursor keys are pressed.

          FNround(n%)             returns the greatest integer r%, r%<=n%, such that r% is a legal constant for direct use
                                  in automaton code; (for example, numbers in the range {256-1023} must be a multiple of 4).

          FNacol(c%)              converts an actual colour value to a GCOL value (with colour in the low bits, 0 to 5,
                                  & tint in bits 6 & 7). Use for example g%=FNacol(c%):GCOL g%AND63 TINT g%. This is very useful
                                  if you want to draw something on screen, but only have the cell state number as used by the
                                  automaton code (this being the actual colour value, as stored in screen memory).

          FNlcol(c%)              converts a GCOL number (with tint in the top two bits) to an actual colour value.


  All these routines can be used within the sections of automaton definition dealing with initialisation of parameters, & set up
of the screen. If you need to access values stored in system variables then you should use something like the following, which
sets the Basic variable sux% to the value held in the system variable sux:
  DIM buf% 256:SYS "OS_ReadVarVal","sux",buf%,256:sux%=!buf%
00000000  0a 20 20 54 41 42 4c 45  20 35 3a 20 54 68 65 20  |.  TABLE 5: The |
00000010  69 6e 69 74 69 61 6c 69  73 61 74 69 6f 6e 20 26  |initialisation &|
00000020  20 73 63 72 65 65 6e 20  73 65 74 2d 75 70 20 4c  | screen set-up L|
00000030  69 62 72 61 72 79 0a 0a  0a 20 20 4e 6f 74 65 3a  |ibrary...  Note:|
00000040  20 74 68 65 20 73 79 73  74 65 6d 20 76 61 72 69  | the system vari|
00000050  61 62 6c 65 73 20 73 75  78 20 26 20 73 75 79 20  |ables sux & suy |
00000060  68 6f 6c 64 20 74 68 65  20 43 41 20 75 6e 69 76  |hold the CA univ|
00000070  65 72 73 65 20 77 69 64  74 68 20 26 20 68 65 69  |erse width & hei|
00000080  67 68 74 3b 20 79 6f 75  20 6d 61 79 20 66 69 6e  |ght; you may fin|
00000090  64 20 74 68 65 73 65 20  75 73 65 66 75 6c 20 77  |d these useful w|
000000a0  68 65 6e 20 73 65 74 74  69 6e 67 20 75 70 20 74  |hen setting up t|
000000b0  68 65 20 73 63 72 65 65  6e 2e 0a 0a 0a 20 20 4e  |he screen....  N|
000000c0  61 6d 65 20 6f 66 20 50  72 6f 63 65 64 75 72 65  |ame of Procedure|
000000d0  2f 46 75 6e 63 74 69 6f  6e 20 20 20 20 20 20 50  |/Function      P|
000000e0  75 72 70 6f 73 65 0a 0a  20 20 20 20 20 20 20 20  |urpose..        |
000000f0  20 20 50 52 4f 43 73 6f  75 70 28 73 25 2c 6e 25  |  PROCsoup(s%,n%|
00000100  2c 70 29 20 20 20 20 20  20 20 66 69 6c 6c 73 20  |,p)       fills |
00000110  74 68 65 20 61 75 74 6f  6d 61 74 6f 6e 20 75 6e  |the automaton un|
00000120  69 76 65 72 73 65 20 72  61 6e 64 6f 6d 6c 79 20  |iverse randomly |
00000130  77 69 74 68 20 63 6f 6c  6f 75 72 73 20 77 68 6f  |with colours who|
00000140  73 65 20 61 63 74 75 61  6c 20 76 61 6c 75 65 73  |se actual values|
00000150  20 72 61 6e 67 65 20 66  72 6f 6d 0a 20 20 20 20  | range from.    |
00000160  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000170  20 20 20 20 20 20 20 20  20 20 20 20 20 20 73 25  |              s%|
00000180  20 74 6f 20 73 25 2b 6e  25 2d 31 3b 20 6e 6f 74  | to s%+n%-1; not|
00000190  65 2c 20 74 68 65 73 65  20 76 61 6c 75 65 73 20  |e, these values |
000001a0  61 72 65 20 61 73 20 73  74 6f 72 65 64 20 69 6e  |are as stored in|
000001b0  20 73 63 72 65 65 6e 20  6d 65 6d 6f 72 79 2c 20  | screen memory, |
000001c0  6e 6f 74 20 47 43 4f 4c  20 6e 75 6d 62 65 72 73  |not GCOL numbers|
000001d0  2e 0a 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |..              |
000001e0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000001f0  20 20 20 20 70 20 69 73  20 74 68 65 20 70 72 6f  |    p is the pro|
00000200  62 61 62 69 6c 69 74 79  20 74 68 61 74 20 61 6e  |bability that an|
00000210  20 61 72 62 69 74 72 61  72 79 20 63 65 6c 6c 20  | arbitrary cell |
00000220  77 69 6c 6c 20 68 61 76  65 20 69 74 27 73 20 63  |will have it's c|
00000230  6f 6e 74 65 6e 74 73 20  6f 76 65 72 77 72 69 74  |ontents overwrit|
00000240  74 65 6e 20 62 79 20 61  20 6e 65 77 0a 20 20 20  |ten by a new.   |
00000250  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000260  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 72  |               r|
00000270  61 6e 64 6f 6d 6c 79 20  73 65 6c 65 63 74 65 64  |andomly selected|
00000280  20 76 61 6c 75 65 2e 0a  20 20 20 20 20 20 20 20  | value..        |
00000290  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000002a0  20 20 20 20 20 20 20 20  20 20 54 68 75 73 20 50  |          Thus P|
000002b0  52 4f 43 73 6f 75 70 28  30 2c 32 35 36 2c 31 29  |ROCsoup(0,256,1)|
000002c0  20 66 69 6c 6c 73 20 74  68 65 20 77 69 6e 64 6f  | fills the windo|
000002d0  77 20 72 61 6e 64 6f 6d  6c 79 20 77 69 74 68 20  |w randomly with |
000002e0  63 6f 6c 6f 75 72 73 20  66 72 6f 6d 20 74 68 65  |colours from the|
000002f0  20 77 68 6f 6c 65 20 72  61 6e 67 65 2c 0a 20 20  | whole range,.  |
00000300  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
*
00000320  77 68 69 6c 65 20 50 52  4f 43 73 6f 75 70 28 32  |while PROCsoup(2|
00000330  35 35 2c 31 2c 2e 31 29  20 77 69 6c 6c 20 73 63  |55,1,.1) will sc|
00000340  61 74 74 65 72 20 77 68  69 74 65 20 63 65 6c 6c  |atter white cell|
00000350  73 20 6f 76 65 72 20 61  62 6f 75 74 20 74 65 6e  |s over about ten|
00000360  20 70 65 72 63 65 6e 74  20 6f 66 20 74 68 65 20  | percent of the |
00000370  62 61 63 6b 67 72 6f 75  6e 64 2e 0a 0a 20 20 20  |background...   |
00000380  20 20 20 20 20 20 20 50  52 4f 43 6c 6f 61 64 20  |       PROCload |
00000390  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 70  |               p|
000003a0  72 6f 6d 70 74 73 20 74  68 65 20 75 73 65 72 20  |rompts the user |
000003b0  66 6f 72 20 74 68 65 20  66 69 6c 65 6e 61 6d 65  |for the filename|
000003c0  20 6f 66 20 61 20 70 72  65 76 69 6f 75 73 6c 79  | of a previously|
000003d0  20 73 61 76 65 64 20 73  63 72 65 65 6e 2c 20 26  | saved screen, &|
000003e0  20 74 68 65 6e 20 6c 6f  61 64 73 20 69 74 20 69  | then loads it i|
000003f0  6e 74 6f 20 74 68 65 0a  20 20 20 20 20 20 20 20  |nto the.        |
00000400  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000410  20 20 20 20 20 20 20 20  20 20 43 41 20 77 69 6e  |          CA win|
00000420  64 6f 77 2e 20 4e 6f 74  65 2c 20 73 63 72 65 65  |dow. Note, scree|
00000430  6e 73 20 61 72 65 20 73  74 6f 72 65 64 20 69 6e  |ns are stored in|
00000440  20 61 20 64 69 72 65 63  74 6f 72 79 20 63 61 6c  | a directory cal|
00000450  6c 65 64 20 27 53 63 72  65 65 6e 73 27 20 77 68  |led 'Screens' wh|
00000460  69 63 68 20 73 68 6f 75  6c 64 20 62 65 20 70 72  |ich should be pr|
00000470  65 73 65 6e 74 0a 20 20  20 20 20 20 20 20 20 20  |esent.          |
00000480  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000490  20 20 20 20 20 20 20 20  69 6e 20 74 68 65 20 73  |        in the s|
000004a0  61 6d 65 20 64 69 72 65  63 74 6f 72 79 20 74 68  |ame directory th|
000004b0  61 74 20 63 6f 6e 74 61  69 6e 73 20 21 41 72 63  |at contains !Arc|
000004c0  41 75 74 3b 20 41 72 63  41 75 74 20 65 78 70 65  |Aut; ArcAut expe|
000004d0  63 74 73 20 74 68 69 73  20 74 6f 20 65 78 69 73  |cts this to exis|
000004e0  74 2c 20 77 68 65 6e 20  73 61 76 69 6e 67 20 26  |t, when saving &|
000004f0  0a 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |.               |
00000500  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000510  20 20 20 6c 6f 61 64 69  6e 67 20 73 63 72 65 65  |   loading scree|
00000520  6e 73 2c 20 73 6f 20 79  6f 75 20 73 68 6f 75 6c  |ns, so you shoul|
00000530  64 20 65 6e 73 75 72 65  20 74 68 65 20 64 69 72  |d ensure the dir|
00000540  65 63 74 6f 72 79 20 69  73 20 70 72 65 73 65 6e  |ectory is presen|
00000550  74 2c 20 65 76 65 6e 20  69 66 20 65 6d 70 74 79  |t, even if empty|
00000560  2e 0a 0a 20 20 20 20 20  20 20 20 20 20 50 52 4f  |...          PRO|
00000570  43 6d 6f 75 73 65 6f 6e  20 20 20 20 20 20 20 20  |Cmouseon        |
00000580  20 20 20 20 20 69 6e 69  74 69 61 6c 69 73 65 73  |     initialises|
00000590  20 74 68 65 20 70 6f 69  6e 74 65 72 20 26 20 72  | the pointer & r|
000005a0  65 73 74 72 69 63 74 73  20 69 74 20 74 6f 20 74  |estricts it to t|
000005b0  68 65 20 77 69 6e 64 6f  77 20 63 6f 6e 74 61 69  |he window contai|
000005c0  6e 69 6e 67 20 74 68 65  20 43 41 20 75 6e 69 76  |ning the CA univ|
000005d0  65 72 73 65 3b 20 74 68  69 73 20 70 72 6f 63 65  |erse; this proce|
000005e0  64 75 72 65 0a 20 20 20  20 20 20 20 20 20 20 20  |dure.           |
000005f0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000600  20 20 20 20 20 20 20 65  78 70 65 63 74 73 20 74  |       expects t|
00000610  68 65 20 76 61 72 69 61  62 6c 65 73 20 73 75 78  |he variables sux|
00000620  25 20 26 20 73 75 79 25  20 74 6f 20 68 6f 6c 64  |% & suy% to hold|
00000630  20 74 68 65 20 77 69 64  74 68 20 26 20 68 65 69  | the width & hei|
00000640  67 68 74 20 6f 66 20 74  68 65 20 77 69 6e 64 6f  |ght of the windo|
00000650  77 3b 20 79 6f 75 20 6d  75 73 74 20 73 65 74 20  |w; you must set |
00000660  74 68 65 73 65 0a 20 20  20 20 20 20 20 20 20 20  |these.          |
00000670  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000680  20 20 20 20 20 20 20 20  75 70 20 62 79 20 72 65  |        up by re|
00000690  61 64 69 6e 67 20 74 68  65 20 76 61 6c 75 65 73  |ading the values|
000006a0  20 73 74 6f 72 65 64 20  69 6e 20 74 68 65 20 73  | stored in the s|
000006b0  79 73 74 65 6d 20 76 61  72 69 61 62 6c 65 73 20  |ystem variables |
000006c0  73 75 78 20 26 20 73 75  79 3b 20 73 65 65 20 66  |sux & suy; see f|
000006d0  6f 72 20 65 78 61 6d 70  6c 65 0a 20 20 20 20 20  |or example.     |
000006e0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000006f0  20 20 20 20 20 20 20 20  20 20 20 20 20 74 68 65  |             the|
00000700  20 61 75 74 6f 6d 61 74  6f 6e 20 27 57 69 72 65  | automaton 'Wire|
00000710  27 2e 0a 0a 20 20 20 20  20 20 20 20 20 20 50 52  |'...          PR|
00000720  4f 43 63 75 72 73 6f 72  73 28 78 25 2c 79 25 29  |OCcursors(x%,y%)|
00000730  20 20 20 20 20 20 72 65  74 75 72 6e 73 20 69 6e  |      returns in|
00000740  20 78 25 20 26 20 79 25  20 76 61 6c 75 65 73 20  | x% & y% values |
00000750  61 63 63 6f 72 64 69 6e  67 20 74 6f 20 77 68 69  |according to whi|
00000760  63 68 20 63 75 72 73 6f  72 20 6b 65 79 73 20 61  |ch cursor keys a|
00000770  72 65 20 70 72 65 73 73  65 64 2e 0a 0a 20 20 20  |re pressed...   |
00000780  20 20 20 20 20 20 20 46  4e 72 6f 75 6e 64 28 6e  |       FNround(n|
00000790  25 29 20 20 20 20 20 20  20 20 20 20 20 20 20 72  |%)             r|
000007a0  65 74 75 72 6e 73 20 74  68 65 20 67 72 65 61 74  |eturns the great|
000007b0  65 73 74 20 69 6e 74 65  67 65 72 20 72 25 2c 20  |est integer r%, |
000007c0  72 25 3c 3d 6e 25 2c 20  73 75 63 68 20 74 68 61  |r%<=n%, such tha|
000007d0  74 20 72 25 20 69 73 20  61 20 6c 65 67 61 6c 20  |t r% is a legal |
000007e0  63 6f 6e 73 74 61 6e 74  20 66 6f 72 20 64 69 72  |constant for dir|
000007f0  65 63 74 20 75 73 65 0a  20 20 20 20 20 20 20 20  |ect use.        |
00000800  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000810  20 20 20 20 20 20 20 20  20 20 69 6e 20 61 75 74  |          in aut|
00000820  6f 6d 61 74 6f 6e 20 63  6f 64 65 3b 20 28 66 6f  |omaton code; (fo|
00000830  72 20 65 78 61 6d 70 6c  65 2c 20 6e 75 6d 62 65  |r example, numbe|
00000840  72 73 20 69 6e 20 74 68  65 20 72 61 6e 67 65 20  |rs in the range |
00000850  7b 32 35 36 2d 31 30 32  33 7d 20 6d 75 73 74 20  |{256-1023} must |
00000860  62 65 20 61 20 6d 75 6c  74 69 70 6c 65 20 6f 66  |be a multiple of|
00000870  20 34 29 2e 0a 0a 20 20  20 20 20 20 20 20 20 20  | 4)...          |
00000880  46 4e 61 63 6f 6c 28 63  25 29 20 20 20 20 20 20  |FNacol(c%)      |
00000890  20 20 20 20 20 20 20 20  63 6f 6e 76 65 72 74 73  |        converts|
000008a0  20 61 6e 20 61 63 74 75  61 6c 20 63 6f 6c 6f 75  | an actual colou|
000008b0  72 20 76 61 6c 75 65 20  74 6f 20 61 20 47 43 4f  |r value to a GCO|
000008c0  4c 20 76 61 6c 75 65 20  28 77 69 74 68 20 63 6f  |L value (with co|
000008d0  6c 6f 75 72 20 69 6e 20  74 68 65 20 6c 6f 77 20  |lour in the low |
000008e0  62 69 74 73 2c 20 30 20  74 6f 20 35 2c 0a 20 20  |bits, 0 to 5,.  |
000008f0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
*
00000910  26 20 74 69 6e 74 20 69  6e 20 62 69 74 73 20 36  |& tint in bits 6|
00000920  20 26 20 37 29 2e 20 55  73 65 20 66 6f 72 20 65  | & 7). Use for e|
00000930  78 61 6d 70 6c 65 20 67  25 3d 46 4e 61 63 6f 6c  |xample g%=FNacol|
00000940  28 63 25 29 3a 47 43 4f  4c 20 67 25 41 4e 44 36  |(c%):GCOL g%AND6|
00000950  33 20 54 49 4e 54 20 67  25 2e 20 54 68 69 73 20  |3 TINT g%. This |
00000960  69 73 20 76 65 72 79 20  75 73 65 66 75 6c 0a 20  |is very useful. |
00000970  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
*
00000990  20 69 66 20 79 6f 75 20  77 61 6e 74 20 74 6f 20  | if you want to |
000009a0  64 72 61 77 20 73 6f 6d  65 74 68 69 6e 67 20 6f  |draw something o|
000009b0  6e 20 73 63 72 65 65 6e  2c 20 62 75 74 20 6f 6e  |n screen, but on|
000009c0  6c 79 20 68 61 76 65 20  74 68 65 20 63 65 6c 6c  |ly have the cell|
000009d0  20 73 74 61 74 65 20 6e  75 6d 62 65 72 20 61 73  | state number as|
000009e0  20 75 73 65 64 20 62 79  20 74 68 65 0a 20 20 20  | used by the.   |
000009f0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000a00  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 61  |               a|
00000a10  75 74 6f 6d 61 74 6f 6e  20 63 6f 64 65 20 28 74  |utomaton code (t|
00000a20  68 69 73 20 62 65 69 6e  67 20 74 68 65 20 61 63  |his being the ac|
00000a30  74 75 61 6c 20 63 6f 6c  6f 75 72 20 76 61 6c 75  |tual colour valu|
00000a40  65 2c 20 61 73 20 73 74  6f 72 65 64 20 69 6e 20  |e, as stored in |
00000a50  73 63 72 65 65 6e 20 6d  65 6d 6f 72 79 29 2e 0a  |screen memory)..|
00000a60  0a 20 20 20 20 20 20 20  20 20 20 46 4e 6c 63 6f  |.          FNlco|
00000a70  6c 28 63 25 29 20 20 20  20 20 20 20 20 20 20 20  |l(c%)           |
00000a80  20 20 20 63 6f 6e 76 65  72 74 73 20 61 20 47 43  |   converts a GC|
00000a90  4f 4c 20 6e 75 6d 62 65  72 20 28 77 69 74 68 20  |OL number (with |
00000aa0  74 69 6e 74 20 69 6e 20  74 68 65 20 74 6f 70 20  |tint in the top |
00000ab0  74 77 6f 20 62 69 74 73  29 20 74 6f 20 61 6e 20  |two bits) to an |
00000ac0  61 63 74 75 61 6c 20 63  6f 6c 6f 75 72 20 76 61  |actual colour va|
00000ad0  6c 75 65 2e 0a 0a 0a 20  20 41 6c 6c 20 74 68 65  |lue....  All the|
00000ae0  73 65 20 72 6f 75 74 69  6e 65 73 20 63 61 6e 20  |se routines can |
00000af0  62 65 20 75 73 65 64 20  77 69 74 68 69 6e 20 74  |be used within t|
00000b00  68 65 20 73 65 63 74 69  6f 6e 73 20 6f 66 20 61  |he sections of a|
00000b10  75 74 6f 6d 61 74 6f 6e  20 64 65 66 69 6e 69 74  |utomaton definit|
00000b20  69 6f 6e 20 64 65 61 6c  69 6e 67 20 77 69 74 68  |ion dealing with|
00000b30  20 69 6e 69 74 69 61 6c  69 73 61 74 69 6f 6e 20  | initialisation |
00000b40  6f 66 20 70 61 72 61 6d  65 74 65 72 73 2c 20 26  |of parameters, &|
00000b50  20 73 65 74 20 75 70 0a  6f 66 20 74 68 65 20 73  | set up.of the s|
00000b60  63 72 65 65 6e 2e 20 49  66 20 79 6f 75 20 6e 65  |creen. If you ne|
00000b70  65 64 20 74 6f 20 61 63  63 65 73 73 20 76 61 6c  |ed to access val|
00000b80  75 65 73 20 73 74 6f 72  65 64 20 69 6e 20 73 79  |ues stored in sy|
00000b90  73 74 65 6d 20 76 61 72  69 61 62 6c 65 73 20 74  |stem variables t|
00000ba0  68 65 6e 20 79 6f 75 20  73 68 6f 75 6c 64 20 75  |hen you should u|
00000bb0  73 65 20 73 6f 6d 65 74  68 69 6e 67 20 6c 69 6b  |se something lik|
00000bc0  65 20 74 68 65 20 66 6f  6c 6c 6f 77 69 6e 67 2c  |e the following,|
00000bd0  20 77 68 69 63 68 0a 73  65 74 73 20 74 68 65 20  | which.sets the |
00000be0  42 61 73 69 63 20 76 61  72 69 61 62 6c 65 20 73  |Basic variable s|
00000bf0  75 78 25 20 74 6f 20 74  68 65 20 76 61 6c 75 65  |ux% to the value|
00000c00  20 68 65 6c 64 20 69 6e  20 74 68 65 20 73 79 73  | held in the sys|
00000c10  74 65 6d 20 76 61 72 69  61 62 6c 65 20 73 75 78  |tem variable sux|
00000c20  3a 0a 20 20 44 49 4d 20  62 75 66 25 20 32 35 36  |:.  DIM buf% 256|
00000c30  3a 53 59 53 20 22 4f 53  5f 52 65 61 64 56 61 72  |:SYS "OS_ReadVar|
00000c40  56 61 6c 22 2c 22 73 75  78 22 2c 62 75 66 25 2c  |Val","sux",buf%,|
00000c50  32 35 36 3a 73 75 78 25  3d 21 62 75 66 25 0a     |256:sux%=!buf%.|
00000c5f