Home » Archimedes archive » Acorn Computing » 1994 08 subscription disc.adf » 9408s » Shareware/Event/Documents/!EShellDoc/StrongHlp/MenuMod/HelpData

Shareware/Event/Documents/!EShellDoc/StrongHlp/MenuMod/HelpData

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 » Acorn Computing » 1994 08 subscription disc.adf » 9408s
Filename: Shareware/Event/Documents/!EShellDoc/StrongHlp/MenuMod/HelpData
Read OK:
File size: 1BF6 bytes
Load address: 0000
Exec address: 0000
File contents
MenuMod - Technical details
The following information has been
extracted from the !Help file
supplied with !Menus by <David Andrews=>EvntShell.Andrews>.

         <Data Format  =>Data>
         <Menu strings =>MenuStrings>                  
         <Menu lists   =>MenuLists>
         <MenuMod SWI's=>MenuModSWIs>MenuMod Data
MenuMod actually uses data tables identical to those used by SWI
"<Wimp_CreateMenu=>SWI.Wimp_CreateMenu>" so no extra conversion is needed you simply pass the
address of the menu structure to the WIMP. As menu files contain more
than one menu finding the address is a bit difficult so <SWI's=>MenuModSWIs> have
been incorporated to calculate them.Menu Lists
These are standard lists of menu selections as returned by SWI
"<Wimp_Poll=>SWI.Wimp_Poll>" ie. a series of words signifying the selection path
terminated by a -1. Again though the menu number (with 0 being the
first in the file) is placed before the list so the above selection
would become 0,0,1,-1 each number would be a word long and the 'Filer'
menu would have to be the first in the file.MenuMod SWI's
All but one of the SWI's are entered with R0
pointing to the base of the menu file, this is the
address where the file is loaded. On exit, all
registers, unless otherwise specified, are
preserved. When you are told R1 should point to a
<menu list=>MenuLists>/<string=>MenuStrings> you can use either, MenuMod
detects which one you are using (It does so by
checking the first word in the string/list, if its
less than 256 then it's a list otherwise its a
string. Incidentally strings don't have to be word
aligned).

   <Menu_Calculate>            <Menu_Read>
   <Menu_Validate>             <Menu_Write>
   <Menu_ListToAddress>        <Menu_Tick>
   <Menu_StringToAddress>      <Menu_Shade>
   <Menu_GetIndirect>          <Menu_SetSubHandle>
   <Menu_StringCompare>Menu_Calculate
This is used to recalculate and reallocate all indirect and
validation strings. It also calculates submenu addresses. It is
usually called immediately after loading the menu file.Menu_Validate
This is called when sub-window handles have been calculated and
stored with SWI "<Menu_SetSubHandle>". It checks to ensure that all
sub-window handles have been defined.Menu_ListToAddress
Params =>
         R1 <Menu list=>MenuLists>

       \<=
         R2 Address of item

This call returns the address of the menu item specified in the
menu list given. If the list contains only a menu number (ie. only the
first word contains data) the call returns the address of the entire
menu structure. This can then be used by SWI "<Wimp_CreateMenu=>SWI.Wimp_CreateMenu>" to open
that menu.Menu_StringToAddress
Params =>
         R1 <Menu string=>MenuStrings>

       \<=
         R2 Address of item

This is similar to SWI "<Menu_ListToAddress>" except it uses menu strings.
Again if only one string is passed (ie. a menu title) it returns the
address of that menu.Menu_Read
Params =>
         R1 <Menu string=>MenuStrings>/<Menu list=>MenuLists>
         R2 offset to read from
         
       \<=
         R3 Value read

This allows you to read the data at an item or menu directly. The
offset is not checked so you must know where you want to load from.
The base address is calculated from the data at R1, so it could point
to an item or a menu.Menu_Write
Params =>
         R1 <Menu string=>MenuStrings>/<Menu list=>MenuLists>
         R2 offset to write to
         R3 value to write

This is used for writing data to items or menus. You must know
where you are storing the data as it could corrupt the menu data.Menu_Tick
Params =>
         R1 <Menu string=>MenuStrings>/<Menu list=>MenuLists>
         R2 State
         
This call allows you to change the state of an items tick icon.
The state is 0 for no tick and non-0 for a tick.

No check is made if you are accessing a menu or an item though
it should only be used on items.Menu_Shade
Params =>
         R1 <Menu string=>MenuStrings>/<Menu list=>MenuLists>
         R2 State
         
This sets the shade flag. The state is 0 for no shade and non-0
to shade an item.

No check is made if you are accessing a menu or an item though
it should only be used on items.Menu_GetIndirect
Params =>
         R1    <Menu string=>MenuStrings>/<Menu list=>MenuLists>
         R2    Item to read from

         R3-R5 Indirect data (3 words)
         
This call finds the addresses of the indirect data. As the
commonest use of this call is for finding the address of a writable
item, it uses a slightly different method of access items. Most
writable items will be blank when the menu is defined and you can't
use a blank in the menu string (a blank string would be classed as a
double zero byte, or the end). To get around this you only specify the
menu where the item is in the menu string/list, so if you were
accessing the input mode number option from the palette you would pass
either 'Mode' or the menu number in the buffer at R1. You then specify
the item you want to read from in R2, in this example this would be 3
(item 4 counted from 0). This value could be replaced with -1, the SWI
will recognises -1 as meaning 'the last item in the menu'.

On exit R3 is the pointer to the indirect string, R4 is the
pointer to the validation string (-1 for none), and R5 is the length
of the indirect string. These are standard pointers. R3 is probably
the most useful as it would point to the data of a writable item.
Though it could be used to store items like the "File 'xxxxxxx'" item
in the Filer menu.

No check is made if you are accessing a menu or an item though
it should only be used on items.Menu_SetSubHandle
Params =>
         R1 <Menu string=>MenuStrings>/<Menu list=>MenuLists>
         R2 Sub window handle
         
This call sets up sub window (or dialog box) handles. It returns
an error if the item wasn't defined as a sub window.

No check is made if you are accessing a menu or an item though
it should only be used on items.Menu_StringCompare
Params =>
         R1 First string
         R2 Second string
         R3 Terminating character
         R4 Maximum number of characters to compare before
            returning 'equals'
         
       \<=
         R0 & R1 Are updated. They will point to after the
         terminators or after the first difference, depending
         on the outcome.
         Z=1 for 'equals',Z=0 for 'not equals'

This compares the two strings specified. The comparison is case
sensitive. If R2 is zero on entry then the the call will accept any
control code as a terminator. The call sets the flags so that NE/EQ
suffixes can be used in machine code (BASIC programmers can ignore
that last bit!)Menu Strings
These consist of a series of zero terminated strings. The entire
string is similar to that returned by SWI "<Wimp_DecodeMenu=>SWI.Wimp_DecodeMenu>" ie.
"Display.Small icons" for a typical filer menu selection. The only
differences are that the initial menu title is placed before the
selection string ie. the above example would become
"Filer.Display.Small icons" also the dots are replaced with zero
bytes. After all the selection strings an extra zero byte is added
signifying the end.
00000000  4d 65 6e 75 4d 6f 64 20  2d 20 54 65 63 68 6e 69  |MenuMod - Techni|
00000010  63 61 6c 20 64 65 74 61  69 6c 73 0a 54 68 65 20  |cal details.The |
00000020  66 6f 6c 6c 6f 77 69 6e  67 20 69 6e 66 6f 72 6d  |following inform|
00000030  61 74 69 6f 6e 20 68 61  73 20 62 65 65 6e 0a 65  |ation has been.e|
00000040  78 74 72 61 63 74 65 64  20 66 72 6f 6d 20 74 68  |xtracted from th|
00000050  65 20 21 48 65 6c 70 20  66 69 6c 65 0a 73 75 70  |e !Help file.sup|
00000060  70 6c 69 65 64 20 77 69  74 68 20 21 4d 65 6e 75  |plied with !Menu|
00000070  73 20 62 79 20 3c 44 61  76 69 64 20 41 6e 64 72  |s by <David Andr|
00000080  65 77 73 3d 3e 45 76 6e  74 53 68 65 6c 6c 2e 41  |ews=>EvntShell.A|
00000090  6e 64 72 65 77 73 3e 2e  0a 0a 20 20 20 20 20 20  |ndrews>...      |
000000a0  20 20 20 3c 44 61 74 61  20 46 6f 72 6d 61 74 20  |   <Data Format |
000000b0  20 3d 3e 44 61 74 61 3e  0a 20 20 20 20 20 20 20  | =>Data>.       |
000000c0  20 20 3c 4d 65 6e 75 20  73 74 72 69 6e 67 73 20  |  <Menu strings |
000000d0  3d 3e 4d 65 6e 75 53 74  72 69 6e 67 73 3e 20 20  |=>MenuStrings>  |
000000e0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000000f0  0a 20 20 20 20 20 20 20  20 20 3c 4d 65 6e 75 20  |.         <Menu |
00000100  6c 69 73 74 73 20 20 20  3d 3e 4d 65 6e 75 4c 69  |lists   =>MenuLi|
00000110  73 74 73 3e 0a 20 20 20  20 20 20 20 20 20 3c 4d  |sts>.         <M|
00000120  65 6e 75 4d 6f 64 20 53  57 49 27 73 3d 3e 4d 65  |enuMod SWI's=>Me|
00000130  6e 75 4d 6f 64 53 57 49  73 3e 4d 65 6e 75 4d 6f  |nuModSWIs>MenuMo|
00000140  64 20 44 61 74 61 0a 4d  65 6e 75 4d 6f 64 20 61  |d Data.MenuMod a|
00000150  63 74 75 61 6c 6c 79 20  75 73 65 73 20 64 61 74  |ctually uses dat|
00000160  61 20 74 61 62 6c 65 73  20 69 64 65 6e 74 69 63  |a tables identic|
00000170  61 6c 20 74 6f 20 74 68  6f 73 65 20 75 73 65 64  |al to those used|
00000180  20 62 79 20 53 57 49 0a  22 3c 57 69 6d 70 5f 43  | by SWI."<Wimp_C|
00000190  72 65 61 74 65 4d 65 6e  75 3d 3e 53 57 49 2e 57  |reateMenu=>SWI.W|
000001a0  69 6d 70 5f 43 72 65 61  74 65 4d 65 6e 75 3e 22  |imp_CreateMenu>"|
000001b0  20 73 6f 20 6e 6f 20 65  78 74 72 61 20 63 6f 6e  | so no extra con|
000001c0  76 65 72 73 69 6f 6e 20  69 73 20 6e 65 65 64 65  |version is neede|
000001d0  64 20 79 6f 75 20 73 69  6d 70 6c 79 20 70 61 73  |d you simply pas|
000001e0  73 20 74 68 65 0a 61 64  64 72 65 73 73 20 6f 66  |s the.address of|
000001f0  20 74 68 65 20 6d 65 6e  75 20 73 74 72 75 63 74  | the menu struct|
00000200  75 72 65 20 74 6f 20 74  68 65 20 57 49 4d 50 2e  |ure to the WIMP.|
00000210  20 41 73 20 6d 65 6e 75  20 66 69 6c 65 73 20 63  | As menu files c|
00000220  6f 6e 74 61 69 6e 20 6d  6f 72 65 0a 74 68 61 6e  |ontain more.than|
00000230  20 6f 6e 65 20 6d 65 6e  75 20 66 69 6e 64 69 6e  | one menu findin|
00000240  67 20 74 68 65 20 61 64  64 72 65 73 73 20 69 73  |g the address is|
00000250  20 61 20 62 69 74 20 64  69 66 66 69 63 75 6c 74  | a bit difficult|
00000260  20 73 6f 20 3c 53 57 49  27 73 3d 3e 4d 65 6e 75  | so <SWI's=>Menu|
00000270  4d 6f 64 53 57 49 73 3e  20 68 61 76 65 0a 62 65  |ModSWIs> have.be|
00000280  65 6e 20 69 6e 63 6f 72  70 6f 72 61 74 65 64 20  |en incorporated |
00000290  74 6f 20 63 61 6c 63 75  6c 61 74 65 20 74 68 65  |to calculate the|
000002a0  6d 2e 4d 65 6e 75 20 4c  69 73 74 73 0a 54 68 65  |m.Menu Lists.The|
000002b0  73 65 20 61 72 65 20 73  74 61 6e 64 61 72 64 20  |se are standard |
000002c0  6c 69 73 74 73 20 6f 66  20 6d 65 6e 75 20 73 65  |lists of menu se|
000002d0  6c 65 63 74 69 6f 6e 73  20 61 73 20 72 65 74 75  |lections as retu|
000002e0  72 6e 65 64 20 62 79 20  53 57 49 0a 22 3c 57 69  |rned by SWI."<Wi|
000002f0  6d 70 5f 50 6f 6c 6c 3d  3e 53 57 49 2e 57 69 6d  |mp_Poll=>SWI.Wim|
00000300  70 5f 50 6f 6c 6c 3e 22  20 69 65 2e 20 61 20 73  |p_Poll>" ie. a s|
00000310  65 72 69 65 73 20 6f 66  20 77 6f 72 64 73 20 73  |eries of words s|
00000320  69 67 6e 69 66 79 69 6e  67 20 74 68 65 20 73 65  |ignifying the se|
00000330  6c 65 63 74 69 6f 6e 20  70 61 74 68 0a 74 65 72  |lection path.ter|
00000340  6d 69 6e 61 74 65 64 20  62 79 20 61 20 2d 31 2e  |minated by a -1.|
00000350  20 41 67 61 69 6e 20 74  68 6f 75 67 68 20 74 68  | Again though th|
00000360  65 20 6d 65 6e 75 20 6e  75 6d 62 65 72 20 28 77  |e menu number (w|
00000370  69 74 68 20 30 20 62 65  69 6e 67 20 74 68 65 0a  |ith 0 being the.|
00000380  66 69 72 73 74 20 69 6e  20 74 68 65 20 66 69 6c  |first in the fil|
00000390  65 29 20 69 73 20 70 6c  61 63 65 64 20 62 65 66  |e) is placed bef|
000003a0  6f 72 65 20 74 68 65 20  6c 69 73 74 20 73 6f 20  |ore the list so |
000003b0  74 68 65 20 61 62 6f 76  65 20 73 65 6c 65 63 74  |the above select|
000003c0  69 6f 6e 0a 77 6f 75 6c  64 20 62 65 63 6f 6d 65  |ion.would become|
000003d0  20 30 2c 30 2c 31 2c 2d  31 20 65 61 63 68 20 6e  | 0,0,1,-1 each n|
000003e0  75 6d 62 65 72 20 77 6f  75 6c 64 20 62 65 20 61  |umber would be a|
000003f0  20 77 6f 72 64 20 6c 6f  6e 67 20 61 6e 64 20 74  | word long and t|
00000400  68 65 20 27 46 69 6c 65  72 27 0a 6d 65 6e 75 20  |he 'Filer'.menu |
00000410  77 6f 75 6c 64 20 68 61  76 65 20 74 6f 20 62 65  |would have to be|
00000420  20 74 68 65 20 66 69 72  73 74 20 69 6e 20 74 68  | the first in th|
00000430  65 20 66 69 6c 65 2e 4d  65 6e 75 4d 6f 64 20 53  |e file.MenuMod S|
00000440  57 49 27 73 0a 41 6c 6c  20 62 75 74 20 6f 6e 65  |WI's.All but one|
00000450  20 6f 66 20 74 68 65 20  53 57 49 27 73 20 61 72  | of the SWI's ar|
00000460  65 20 65 6e 74 65 72 65  64 20 77 69 74 68 20 52  |e entered with R|
00000470  30 0a 70 6f 69 6e 74 69  6e 67 20 74 6f 20 74 68  |0.pointing to th|
00000480  65 20 62 61 73 65 20 6f  66 20 74 68 65 20 6d 65  |e base of the me|
00000490  6e 75 20 66 69 6c 65 2c  20 74 68 69 73 20 69 73  |nu file, this is|
000004a0  20 74 68 65 0a 61 64 64  72 65 73 73 20 77 68 65  | the.address whe|
000004b0  72 65 20 74 68 65 20 66  69 6c 65 20 69 73 20 6c  |re the file is l|
000004c0  6f 61 64 65 64 2e 20 4f  6e 20 65 78 69 74 2c 20  |oaded. On exit, |
000004d0  61 6c 6c 0a 72 65 67 69  73 74 65 72 73 2c 20 75  |all.registers, u|
000004e0  6e 6c 65 73 73 20 6f 74  68 65 72 77 69 73 65 20  |nless otherwise |
000004f0  73 70 65 63 69 66 69 65  64 2c 20 61 72 65 0a 70  |specified, are.p|
00000500  72 65 73 65 72 76 65 64  2e 20 57 68 65 6e 20 79  |reserved. When y|
00000510  6f 75 20 61 72 65 20 74  6f 6c 64 20 52 31 20 73  |ou are told R1 s|
00000520  68 6f 75 6c 64 20 70 6f  69 6e 74 20 74 6f 20 61  |hould point to a|
00000530  0a 3c 6d 65 6e 75 20 6c  69 73 74 3d 3e 4d 65 6e  |.<menu list=>Men|
00000540  75 4c 69 73 74 73 3e 2f  3c 73 74 72 69 6e 67 3d  |uLists>/<string=|
00000550  3e 4d 65 6e 75 53 74 72  69 6e 67 73 3e 20 79 6f  |>MenuStrings> yo|
00000560  75 20 63 61 6e 20 75 73  65 20 65 69 74 68 65 72  |u can use either|
00000570  2c 20 4d 65 6e 75 4d 6f  64 0a 64 65 74 65 63 74  |, MenuMod.detect|
00000580  73 20 77 68 69 63 68 20  6f 6e 65 20 79 6f 75 20  |s which one you |
00000590  61 72 65 20 75 73 69 6e  67 20 28 49 74 20 64 6f  |are using (It do|
000005a0  65 73 20 73 6f 20 62 79  0a 63 68 65 63 6b 69 6e  |es so by.checkin|
000005b0  67 20 74 68 65 20 66 69  72 73 74 20 77 6f 72 64  |g the first word|
000005c0  20 69 6e 20 74 68 65 20  73 74 72 69 6e 67 2f 6c  | in the string/l|
000005d0  69 73 74 2c 20 69 66 20  69 74 73 0a 6c 65 73 73  |ist, if its.less|
000005e0  20 74 68 61 6e 20 32 35  36 20 74 68 65 6e 20 69  | than 256 then i|
000005f0  74 27 73 20 61 20 6c 69  73 74 20 6f 74 68 65 72  |t's a list other|
00000600  77 69 73 65 20 69 74 73  20 61 0a 73 74 72 69 6e  |wise its a.strin|
00000610  67 2e 20 49 6e 63 69 64  65 6e 74 61 6c 6c 79 20  |g. Incidentally |
00000620  73 74 72 69 6e 67 73 20  64 6f 6e 27 74 20 68 61  |strings don't ha|
00000630  76 65 20 74 6f 20 62 65  20 77 6f 72 64 0a 61 6c  |ve to be word.al|
00000640  69 67 6e 65 64 29 2e 0a  0a 20 20 20 3c 4d 65 6e  |igned)...   <Men|
00000650  75 5f 43 61 6c 63 75 6c  61 74 65 3e 20 20 20 20  |u_Calculate>    |
00000660  20 20 20 20 20 20 20 20  3c 4d 65 6e 75 5f 52 65  |        <Menu_Re|
00000670  61 64 3e 0a 20 20 20 3c  4d 65 6e 75 5f 56 61 6c  |ad>.   <Menu_Val|
00000680  69 64 61 74 65 3e 20 20  20 20 20 20 20 20 20 20  |idate>          |
00000690  20 20 20 3c 4d 65 6e 75  5f 57 72 69 74 65 3e 0a  |   <Menu_Write>.|
000006a0  20 20 20 3c 4d 65 6e 75  5f 4c 69 73 74 54 6f 41  |   <Menu_ListToA|
000006b0  64 64 72 65 73 73 3e 20  20 20 20 20 20 20 20 3c  |ddress>        <|
000006c0  4d 65 6e 75 5f 54 69 63  6b 3e 0a 20 20 20 3c 4d  |Menu_Tick>.   <M|
000006d0  65 6e 75 5f 53 74 72 69  6e 67 54 6f 41 64 64 72  |enu_StringToAddr|
000006e0  65 73 73 3e 20 20 20 20  20 20 3c 4d 65 6e 75 5f  |ess>      <Menu_|
000006f0  53 68 61 64 65 3e 0a 20  20 20 3c 4d 65 6e 75 5f  |Shade>.   <Menu_|
00000700  47 65 74 49 6e 64 69 72  65 63 74 3e 20 20 20 20  |GetIndirect>    |
00000710  20 20 20 20 20 20 3c 4d  65 6e 75 5f 53 65 74 53  |      <Menu_SetS|
00000720  75 62 48 61 6e 64 6c 65  3e 0a 20 20 20 3c 4d 65  |ubHandle>.   <Me|
00000730  6e 75 5f 53 74 72 69 6e  67 43 6f 6d 70 61 72 65  |nu_StringCompare|
00000740  3e 4d 65 6e 75 5f 43 61  6c 63 75 6c 61 74 65 0a  |>Menu_Calculate.|
00000750  54 68 69 73 20 69 73 20  75 73 65 64 20 74 6f 20  |This is used to |
00000760  72 65 63 61 6c 63 75 6c  61 74 65 20 61 6e 64 20  |recalculate and |
00000770  72 65 61 6c 6c 6f 63 61  74 65 20 61 6c 6c 20 69  |reallocate all i|
00000780  6e 64 69 72 65 63 74 20  61 6e 64 0a 76 61 6c 69  |ndirect and.vali|
00000790  64 61 74 69 6f 6e 20 73  74 72 69 6e 67 73 2e 20  |dation strings. |
000007a0  49 74 20 61 6c 73 6f 20  63 61 6c 63 75 6c 61 74  |It also calculat|
000007b0  65 73 20 73 75 62 6d 65  6e 75 20 61 64 64 72 65  |es submenu addre|
000007c0  73 73 65 73 2e 20 49 74  20 69 73 0a 75 73 75 61  |sses. It is.usua|
000007d0  6c 6c 79 20 63 61 6c 6c  65 64 20 69 6d 6d 65 64  |lly called immed|
000007e0  69 61 74 65 6c 79 20 61  66 74 65 72 20 6c 6f 61  |iately after loa|
000007f0  64 69 6e 67 20 74 68 65  20 6d 65 6e 75 20 66 69  |ding the menu fi|
00000800  6c 65 2e 4d 65 6e 75 5f  56 61 6c 69 64 61 74 65  |le.Menu_Validate|
00000810  0a 54 68 69 73 20 69 73  20 63 61 6c 6c 65 64 20  |.This is called |
00000820  77 68 65 6e 20 73 75 62  2d 77 69 6e 64 6f 77 20  |when sub-window |
00000830  68 61 6e 64 6c 65 73 20  68 61 76 65 20 62 65 65  |handles have bee|
00000840  6e 20 63 61 6c 63 75 6c  61 74 65 64 20 61 6e 64  |n calculated and|
00000850  0a 73 74 6f 72 65 64 20  77 69 74 68 20 53 57 49  |.stored with SWI|
00000860  20 22 3c 4d 65 6e 75 5f  53 65 74 53 75 62 48 61  | "<Menu_SetSubHa|
00000870  6e 64 6c 65 3e 22 2e 20  49 74 20 63 68 65 63 6b  |ndle>". It check|
00000880  73 20 74 6f 20 65 6e 73  75 72 65 20 74 68 61 74  |s to ensure that|
00000890  20 61 6c 6c 0a 73 75 62  2d 77 69 6e 64 6f 77 20  | all.sub-window |
000008a0  68 61 6e 64 6c 65 73 20  68 61 76 65 20 62 65 65  |handles have bee|
000008b0  6e 20 64 65 66 69 6e 65  64 2e 4d 65 6e 75 5f 4c  |n defined.Menu_L|
000008c0  69 73 74 54 6f 41 64 64  72 65 73 73 0a 50 61 72  |istToAddress.Par|
000008d0  61 6d 73 20 3d 3e 0a 20  20 20 20 20 20 20 20 20  |ams =>.         |
000008e0  52 31 20 3c 4d 65 6e 75  20 6c 69 73 74 3d 3e 4d  |R1 <Menu list=>M|
000008f0  65 6e 75 4c 69 73 74 73  3e 0a 0a 20 20 20 20 20  |enuLists>..     |
00000900  20 20 5c 3c 3d 0a 20 20  20 20 20 20 20 20 20 52  |  \<=.         R|
00000910  32 20 41 64 64 72 65 73  73 20 6f 66 20 69 74 65  |2 Address of ite|
00000920  6d 0a 0a 54 68 69 73 20  63 61 6c 6c 20 72 65 74  |m..This call ret|
00000930  75 72 6e 73 20 74 68 65  20 61 64 64 72 65 73 73  |urns the address|
00000940  20 6f 66 20 74 68 65 20  6d 65 6e 75 20 69 74 65  | of the menu ite|
00000950  6d 20 73 70 65 63 69 66  69 65 64 20 69 6e 20 74  |m specified in t|
00000960  68 65 0a 6d 65 6e 75 20  6c 69 73 74 20 67 69 76  |he.menu list giv|
00000970  65 6e 2e 20 49 66 20 74  68 65 20 6c 69 73 74 20  |en. If the list |
00000980  63 6f 6e 74 61 69 6e 73  20 6f 6e 6c 79 20 61 20  |contains only a |
00000990  6d 65 6e 75 20 6e 75 6d  62 65 72 20 28 69 65 2e  |menu number (ie.|
000009a0  20 6f 6e 6c 79 20 74 68  65 0a 66 69 72 73 74 20  | only the.first |
000009b0  77 6f 72 64 20 63 6f 6e  74 61 69 6e 73 20 64 61  |word contains da|
000009c0  74 61 29 20 74 68 65 20  63 61 6c 6c 20 72 65 74  |ta) the call ret|
000009d0  75 72 6e 73 20 74 68 65  20 61 64 64 72 65 73 73  |urns the address|
000009e0  20 6f 66 20 74 68 65 20  65 6e 74 69 72 65 0a 6d  | of the entire.m|
000009f0  65 6e 75 20 73 74 72 75  63 74 75 72 65 2e 20 54  |enu structure. T|
00000a00  68 69 73 20 63 61 6e 20  74 68 65 6e 20 62 65 20  |his can then be |
00000a10  75 73 65 64 20 62 79 20  53 57 49 20 22 3c 57 69  |used by SWI "<Wi|
00000a20  6d 70 5f 43 72 65 61 74  65 4d 65 6e 75 3d 3e 53  |mp_CreateMenu=>S|
00000a30  57 49 2e 57 69 6d 70 5f  43 72 65 61 74 65 4d 65  |WI.Wimp_CreateMe|
00000a40  6e 75 3e 22 20 74 6f 20  6f 70 65 6e 0a 74 68 61  |nu>" to open.tha|
00000a50  74 20 6d 65 6e 75 2e 4d  65 6e 75 5f 53 74 72 69  |t menu.Menu_Stri|
00000a60  6e 67 54 6f 41 64 64 72  65 73 73 0a 50 61 72 61  |ngToAddress.Para|
00000a70  6d 73 20 3d 3e 0a 20 20  20 20 20 20 20 20 20 52  |ms =>.         R|
00000a80  31 20 3c 4d 65 6e 75 20  73 74 72 69 6e 67 3d 3e  |1 <Menu string=>|
00000a90  4d 65 6e 75 53 74 72 69  6e 67 73 3e 0a 0a 20 20  |MenuStrings>..  |
00000aa0  20 20 20 20 20 5c 3c 3d  0a 20 20 20 20 20 20 20  |     \<=.       |
00000ab0  20 20 52 32 20 41 64 64  72 65 73 73 20 6f 66 20  |  R2 Address of |
00000ac0  69 74 65 6d 0a 0a 54 68  69 73 20 69 73 20 73 69  |item..This is si|
00000ad0  6d 69 6c 61 72 20 74 6f  20 53 57 49 20 22 3c 4d  |milar to SWI "<M|
00000ae0  65 6e 75 5f 4c 69 73 74  54 6f 41 64 64 72 65 73  |enu_ListToAddres|
00000af0  73 3e 22 20 65 78 63 65  70 74 20 69 74 20 75 73  |s>" except it us|
00000b00  65 73 20 6d 65 6e 75 20  73 74 72 69 6e 67 73 2e  |es menu strings.|
00000b10  0a 41 67 61 69 6e 20 69  66 20 6f 6e 6c 79 20 6f  |.Again if only o|
00000b20  6e 65 20 73 74 72 69 6e  67 20 69 73 20 70 61 73  |ne string is pas|
00000b30  73 65 64 20 28 69 65 2e  20 61 20 6d 65 6e 75 20  |sed (ie. a menu |
00000b40  74 69 74 6c 65 29 20 69  74 20 72 65 74 75 72 6e  |title) it return|
00000b50  73 20 74 68 65 0a 61 64  64 72 65 73 73 20 6f 66  |s the.address of|
00000b60  20 74 68 61 74 20 6d 65  6e 75 2e 4d 65 6e 75 5f  | that menu.Menu_|
00000b70  52 65 61 64 0a 50 61 72  61 6d 73 20 3d 3e 0a 20  |Read.Params =>. |
00000b80  20 20 20 20 20 20 20 20  52 31 20 3c 4d 65 6e 75  |        R1 <Menu|
00000b90  20 73 74 72 69 6e 67 3d  3e 4d 65 6e 75 53 74 72  | string=>MenuStr|
00000ba0  69 6e 67 73 3e 2f 3c 4d  65 6e 75 20 6c 69 73 74  |ings>/<Menu list|
00000bb0  3d 3e 4d 65 6e 75 4c 69  73 74 73 3e 0a 20 20 20  |=>MenuLists>.   |
00000bc0  20 20 20 20 20 20 52 32  20 6f 66 66 73 65 74 20  |      R2 offset |
00000bd0  74 6f 20 72 65 61 64 20  66 72 6f 6d 0a 20 20 20  |to read from.   |
00000be0  20 20 20 20 20 20 0a 20  20 20 20 20 20 20 5c 3c  |      .       \<|
00000bf0  3d 0a 20 20 20 20 20 20  20 20 20 52 33 20 56 61  |=.         R3 Va|
00000c00  6c 75 65 20 72 65 61 64  0a 0a 54 68 69 73 20 61  |lue read..This a|
00000c10  6c 6c 6f 77 73 20 79 6f  75 20 74 6f 20 72 65 61  |llows you to rea|
00000c20  64 20 74 68 65 20 64 61  74 61 20 61 74 20 61 6e  |d the data at an|
00000c30  20 69 74 65 6d 20 6f 72  20 6d 65 6e 75 20 64 69  | item or menu di|
00000c40  72 65 63 74 6c 79 2e 20  54 68 65 0a 6f 66 66 73  |rectly. The.offs|
00000c50  65 74 20 69 73 20 6e 6f  74 20 63 68 65 63 6b 65  |et is not checke|
00000c60  64 20 73 6f 20 79 6f 75  20 6d 75 73 74 20 6b 6e  |d so you must kn|
00000c70  6f 77 20 77 68 65 72 65  20 79 6f 75 20 77 61 6e  |ow where you wan|
00000c80  74 20 74 6f 20 6c 6f 61  64 20 66 72 6f 6d 2e 0a  |t to load from..|
00000c90  54 68 65 20 62 61 73 65  20 61 64 64 72 65 73 73  |The base address|
00000ca0  20 69 73 20 63 61 6c 63  75 6c 61 74 65 64 20 66  | is calculated f|
00000cb0  72 6f 6d 20 74 68 65 20  64 61 74 61 20 61 74 20  |rom the data at |
00000cc0  52 31 2c 20 73 6f 20 69  74 20 63 6f 75 6c 64 20  |R1, so it could |
00000cd0  70 6f 69 6e 74 0a 74 6f  20 61 6e 20 69 74 65 6d  |point.to an item|
00000ce0  20 6f 72 20 61 20 6d 65  6e 75 2e 4d 65 6e 75 5f  | or a menu.Menu_|
00000cf0  57 72 69 74 65 0a 50 61  72 61 6d 73 20 3d 3e 0a  |Write.Params =>.|
00000d00  20 20 20 20 20 20 20 20  20 52 31 20 3c 4d 65 6e  |         R1 <Men|
00000d10  75 20 73 74 72 69 6e 67  3d 3e 4d 65 6e 75 53 74  |u string=>MenuSt|
00000d20  72 69 6e 67 73 3e 2f 3c  4d 65 6e 75 20 6c 69 73  |rings>/<Menu lis|
00000d30  74 3d 3e 4d 65 6e 75 4c  69 73 74 73 3e 0a 20 20  |t=>MenuLists>.  |
00000d40  20 20 20 20 20 20 20 52  32 20 6f 66 66 73 65 74  |       R2 offset|
00000d50  20 74 6f 20 77 72 69 74  65 20 74 6f 0a 20 20 20  | to write to.   |
00000d60  20 20 20 20 20 20 52 33  20 76 61 6c 75 65 20 74  |      R3 value t|
00000d70  6f 20 77 72 69 74 65 0a  0a 54 68 69 73 20 69 73  |o write..This is|
00000d80  20 75 73 65 64 20 66 6f  72 20 77 72 69 74 69 6e  | used for writin|
00000d90  67 20 64 61 74 61 20 74  6f 20 69 74 65 6d 73 20  |g data to items |
00000da0  6f 72 20 6d 65 6e 75 73  2e 20 59 6f 75 20 6d 75  |or menus. You mu|
00000db0  73 74 20 6b 6e 6f 77 0a  77 68 65 72 65 20 79 6f  |st know.where yo|
00000dc0  75 20 61 72 65 20 73 74  6f 72 69 6e 67 20 74 68  |u are storing th|
00000dd0  65 20 64 61 74 61 20 61  73 20 69 74 20 63 6f 75  |e data as it cou|
00000de0  6c 64 20 63 6f 72 72 75  70 74 20 74 68 65 20 6d  |ld corrupt the m|
00000df0  65 6e 75 20 64 61 74 61  2e 4d 65 6e 75 5f 54 69  |enu data.Menu_Ti|
00000e00  63 6b 0a 50 61 72 61 6d  73 20 3d 3e 0a 20 20 20  |ck.Params =>.   |
00000e10  20 20 20 20 20 20 52 31  20 3c 4d 65 6e 75 20 73  |      R1 <Menu s|
00000e20  74 72 69 6e 67 3d 3e 4d  65 6e 75 53 74 72 69 6e  |tring=>MenuStrin|
00000e30  67 73 3e 2f 3c 4d 65 6e  75 20 6c 69 73 74 3d 3e  |gs>/<Menu list=>|
00000e40  4d 65 6e 75 4c 69 73 74  73 3e 0a 20 20 20 20 20  |MenuLists>.     |
00000e50  20 20 20 20 52 32 20 53  74 61 74 65 0a 20 20 20  |    R2 State.   |
00000e60  20 20 20 20 20 20 0a 54  68 69 73 20 63 61 6c 6c  |      .This call|
00000e70  20 61 6c 6c 6f 77 73 20  79 6f 75 20 74 6f 20 63  | allows you to c|
00000e80  68 61 6e 67 65 20 74 68  65 20 73 74 61 74 65 20  |hange the state |
00000e90  6f 66 20 61 6e 20 69 74  65 6d 73 20 74 69 63 6b  |of an items tick|
00000ea0  20 69 63 6f 6e 2e 0a 54  68 65 20 73 74 61 74 65  | icon..The state|
00000eb0  20 69 73 20 30 20 66 6f  72 20 6e 6f 20 74 69 63  | is 0 for no tic|
00000ec0  6b 20 61 6e 64 20 6e 6f  6e 2d 30 20 66 6f 72 20  |k and non-0 for |
00000ed0  61 20 74 69 63 6b 2e 0a  0a 4e 6f 20 63 68 65 63  |a tick...No chec|
00000ee0  6b 20 69 73 20 6d 61 64  65 20 69 66 20 79 6f 75  |k is made if you|
00000ef0  20 61 72 65 20 61 63 63  65 73 73 69 6e 67 20 61  | are accessing a|
00000f00  20 6d 65 6e 75 20 6f 72  20 61 6e 20 69 74 65 6d  | menu or an item|
00000f10  20 74 68 6f 75 67 68 0a  69 74 20 73 68 6f 75 6c  | though.it shoul|
00000f20  64 20 6f 6e 6c 79 20 62  65 20 75 73 65 64 20 6f  |d only be used o|
00000f30  6e 20 69 74 65 6d 73 2e  4d 65 6e 75 5f 53 68 61  |n items.Menu_Sha|
00000f40  64 65 0a 50 61 72 61 6d  73 20 3d 3e 0a 20 20 20  |de.Params =>.   |
00000f50  20 20 20 20 20 20 52 31  20 3c 4d 65 6e 75 20 73  |      R1 <Menu s|
00000f60  74 72 69 6e 67 3d 3e 4d  65 6e 75 53 74 72 69 6e  |tring=>MenuStrin|
00000f70  67 73 3e 2f 3c 4d 65 6e  75 20 6c 69 73 74 3d 3e  |gs>/<Menu list=>|
00000f80  4d 65 6e 75 4c 69 73 74  73 3e 0a 20 20 20 20 20  |MenuLists>.     |
00000f90  20 20 20 20 52 32 20 53  74 61 74 65 0a 20 20 20  |    R2 State.   |
00000fa0  20 20 20 20 20 20 0a 54  68 69 73 20 73 65 74 73  |      .This sets|
00000fb0  20 74 68 65 20 73 68 61  64 65 20 66 6c 61 67 2e  | the shade flag.|
00000fc0  20 54 68 65 20 73 74 61  74 65 20 69 73 20 30 20  | The state is 0 |
00000fd0  66 6f 72 20 6e 6f 20 73  68 61 64 65 20 61 6e 64  |for no shade and|
00000fe0  20 6e 6f 6e 2d 30 0a 74  6f 20 73 68 61 64 65 20  | non-0.to shade |
00000ff0  61 6e 20 69 74 65 6d 2e  0a 0a 4e 6f 20 63 68 65  |an item...No che|
00001000  63 6b 20 69 73 20 6d 61  64 65 20 69 66 20 79 6f  |ck is made if yo|
00001010  75 20 61 72 65 20 61 63  63 65 73 73 69 6e 67 20  |u are accessing |
00001020  61 20 6d 65 6e 75 20 6f  72 20 61 6e 20 69 74 65  |a menu or an ite|
00001030  6d 20 74 68 6f 75 67 68  0a 69 74 20 73 68 6f 75  |m though.it shou|
00001040  6c 64 20 6f 6e 6c 79 20  62 65 20 75 73 65 64 20  |ld only be used |
00001050  6f 6e 20 69 74 65 6d 73  2e 4d 65 6e 75 5f 47 65  |on items.Menu_Ge|
00001060  74 49 6e 64 69 72 65 63  74 0a 50 61 72 61 6d 73  |tIndirect.Params|
00001070  20 3d 3e 0a 20 20 20 20  20 20 20 20 20 52 31 20  | =>.         R1 |
00001080  20 20 20 3c 4d 65 6e 75  20 73 74 72 69 6e 67 3d  |   <Menu string=|
00001090  3e 4d 65 6e 75 53 74 72  69 6e 67 73 3e 2f 3c 4d  |>MenuStrings>/<M|
000010a0  65 6e 75 20 6c 69 73 74  3d 3e 4d 65 6e 75 4c 69  |enu list=>MenuLi|
000010b0  73 74 73 3e 0a 20 20 20  20 20 20 20 20 20 52 32  |sts>.         R2|
000010c0  20 20 20 20 49 74 65 6d  20 74 6f 20 72 65 61 64  |    Item to read|
000010d0  20 66 72 6f 6d 0a 0a 20  20 20 20 20 20 20 20 20  | from..         |
000010e0  52 33 2d 52 35 20 49 6e  64 69 72 65 63 74 20 64  |R3-R5 Indirect d|
000010f0  61 74 61 20 28 33 20 77  6f 72 64 73 29 0a 20 20  |ata (3 words).  |
00001100  20 20 20 20 20 20 20 0a  54 68 69 73 20 63 61 6c  |       .This cal|
00001110  6c 20 66 69 6e 64 73 20  74 68 65 20 61 64 64 72  |l finds the addr|
00001120  65 73 73 65 73 20 6f 66  20 74 68 65 20 69 6e 64  |esses of the ind|
00001130  69 72 65 63 74 20 64 61  74 61 2e 20 41 73 20 74  |irect data. As t|
00001140  68 65 0a 63 6f 6d 6d 6f  6e 65 73 74 20 75 73 65  |he.commonest use|
00001150  20 6f 66 20 74 68 69 73  20 63 61 6c 6c 20 69 73  | of this call is|
00001160  20 66 6f 72 20 66 69 6e  64 69 6e 67 20 74 68 65  | for finding the|
00001170  20 61 64 64 72 65 73 73  20 6f 66 20 61 20 77 72  | address of a wr|
00001180  69 74 61 62 6c 65 0a 69  74 65 6d 2c 20 69 74 20  |itable.item, it |
00001190  75 73 65 73 20 61 20 73  6c 69 67 68 74 6c 79 20  |uses a slightly |
000011a0  64 69 66 66 65 72 65 6e  74 20 6d 65 74 68 6f 64  |different method|
000011b0  20 6f 66 20 61 63 63 65  73 73 20 69 74 65 6d 73  | of access items|
000011c0  2e 20 4d 6f 73 74 0a 77  72 69 74 61 62 6c 65 20  |. Most.writable |
000011d0  69 74 65 6d 73 20 77 69  6c 6c 20 62 65 20 62 6c  |items will be bl|
000011e0  61 6e 6b 20 77 68 65 6e  20 74 68 65 20 6d 65 6e  |ank when the men|
000011f0  75 20 69 73 20 64 65 66  69 6e 65 64 20 61 6e 64  |u is defined and|
00001200  20 79 6f 75 20 63 61 6e  27 74 0a 75 73 65 20 61  | you can't.use a|
00001210  20 62 6c 61 6e 6b 20 69  6e 20 74 68 65 20 6d 65  | blank in the me|
00001220  6e 75 20 73 74 72 69 6e  67 20 28 61 20 62 6c 61  |nu string (a bla|
00001230  6e 6b 20 73 74 72 69 6e  67 20 77 6f 75 6c 64 20  |nk string would |
00001240  62 65 20 63 6c 61 73 73  65 64 20 61 73 20 61 0a  |be classed as a.|
00001250  64 6f 75 62 6c 65 20 7a  65 72 6f 20 62 79 74 65  |double zero byte|
00001260  2c 20 6f 72 20 74 68 65  20 65 6e 64 29 2e 20 54  |, or the end). T|
00001270  6f 20 67 65 74 20 61 72  6f 75 6e 64 20 74 68 69  |o get around thi|
00001280  73 20 79 6f 75 20 6f 6e  6c 79 20 73 70 65 63 69  |s you only speci|
00001290  66 79 20 74 68 65 0a 6d  65 6e 75 20 77 68 65 72  |fy the.menu wher|
000012a0  65 20 74 68 65 20 69 74  65 6d 20 69 73 20 69 6e  |e the item is in|
000012b0  20 74 68 65 20 6d 65 6e  75 20 73 74 72 69 6e 67  | the menu string|
000012c0  2f 6c 69 73 74 2c 20 73  6f 20 69 66 20 79 6f 75  |/list, so if you|
000012d0  20 77 65 72 65 0a 61 63  63 65 73 73 69 6e 67 20  | were.accessing |
000012e0  74 68 65 20 69 6e 70 75  74 20 6d 6f 64 65 20 6e  |the input mode n|
000012f0  75 6d 62 65 72 20 6f 70  74 69 6f 6e 20 66 72 6f  |umber option fro|
00001300  6d 20 74 68 65 20 70 61  6c 65 74 74 65 20 79 6f  |m the palette yo|
00001310  75 20 77 6f 75 6c 64 20  70 61 73 73 0a 65 69 74  |u would pass.eit|
00001320  68 65 72 20 27 4d 6f 64  65 27 20 6f 72 20 74 68  |her 'Mode' or th|
00001330  65 20 6d 65 6e 75 20 6e  75 6d 62 65 72 20 69 6e  |e menu number in|
00001340  20 74 68 65 20 62 75 66  66 65 72 20 61 74 20 52  | the buffer at R|
00001350  31 2e 20 59 6f 75 20 74  68 65 6e 20 73 70 65 63  |1. You then spec|
00001360  69 66 79 0a 74 68 65 20  69 74 65 6d 20 79 6f 75  |ify.the item you|
00001370  20 77 61 6e 74 20 74 6f  20 72 65 61 64 20 66 72  | want to read fr|
00001380  6f 6d 20 69 6e 20 52 32  2c 20 69 6e 20 74 68 69  |om in R2, in thi|
00001390  73 20 65 78 61 6d 70 6c  65 20 74 68 69 73 20 77  |s example this w|
000013a0  6f 75 6c 64 20 62 65 20  33 0a 28 69 74 65 6d 20  |ould be 3.(item |
000013b0  34 20 63 6f 75 6e 74 65  64 20 66 72 6f 6d 20 30  |4 counted from 0|
000013c0  29 2e 20 54 68 69 73 20  76 61 6c 75 65 20 63 6f  |). This value co|
000013d0  75 6c 64 20 62 65 20 72  65 70 6c 61 63 65 64 20  |uld be replaced |
000013e0  77 69 74 68 20 2d 31 2c  20 74 68 65 20 53 57 49  |with -1, the SWI|
000013f0  0a 77 69 6c 6c 20 72 65  63 6f 67 6e 69 73 65 73  |.will recognises|
00001400  20 2d 31 20 61 73 20 6d  65 61 6e 69 6e 67 20 27  | -1 as meaning '|
00001410  74 68 65 20 6c 61 73 74  20 69 74 65 6d 20 69 6e  |the last item in|
00001420  20 74 68 65 20 6d 65 6e  75 27 2e 0a 0a 4f 6e 20  | the menu'...On |
00001430  65 78 69 74 20 52 33 20  69 73 20 74 68 65 20 70  |exit R3 is the p|
00001440  6f 69 6e 74 65 72 20 74  6f 20 74 68 65 20 69 6e  |ointer to the in|
00001450  64 69 72 65 63 74 20 73  74 72 69 6e 67 2c 20 52  |direct string, R|
00001460  34 20 69 73 20 74 68 65  0a 70 6f 69 6e 74 65 72  |4 is the.pointer|
00001470  20 74 6f 20 74 68 65 20  76 61 6c 69 64 61 74 69  | to the validati|
00001480  6f 6e 20 73 74 72 69 6e  67 20 28 2d 31 20 66 6f  |on string (-1 fo|
00001490  72 20 6e 6f 6e 65 29 2c  20 61 6e 64 20 52 35 20  |r none), and R5 |
000014a0  69 73 20 74 68 65 20 6c  65 6e 67 74 68 0a 6f 66  |is the length.of|
000014b0  20 74 68 65 20 69 6e 64  69 72 65 63 74 20 73 74  | the indirect st|
000014c0  72 69 6e 67 2e 20 54 68  65 73 65 20 61 72 65 20  |ring. These are |
000014d0  73 74 61 6e 64 61 72 64  20 70 6f 69 6e 74 65 72  |standard pointer|
000014e0  73 2e 20 52 33 20 69 73  20 70 72 6f 62 61 62 6c  |s. R3 is probabl|
000014f0  79 0a 74 68 65 20 6d 6f  73 74 20 75 73 65 66 75  |y.the most usefu|
00001500  6c 20 61 73 20 69 74 20  77 6f 75 6c 64 20 70 6f  |l as it would po|
00001510  69 6e 74 20 74 6f 20 74  68 65 20 64 61 74 61 20  |int to the data |
00001520  6f 66 20 61 20 77 72 69  74 61 62 6c 65 20 69 74  |of a writable it|
00001530  65 6d 2e 0a 54 68 6f 75  67 68 20 69 74 20 63 6f  |em..Though it co|
00001540  75 6c 64 20 62 65 20 75  73 65 64 20 74 6f 20 73  |uld be used to s|
00001550  74 6f 72 65 20 69 74 65  6d 73 20 6c 69 6b 65 20  |tore items like |
00001560  74 68 65 20 22 46 69 6c  65 20 27 78 78 78 78 78  |the "File 'xxxxx|
00001570  78 78 27 22 20 69 74 65  6d 0a 69 6e 20 74 68 65  |xx'" item.in the|
00001580  20 46 69 6c 65 72 20 6d  65 6e 75 2e 0a 0a 4e 6f  | Filer menu...No|
00001590  20 63 68 65 63 6b 20 69  73 20 6d 61 64 65 20 69  | check is made i|
000015a0  66 20 79 6f 75 20 61 72  65 20 61 63 63 65 73 73  |f you are access|
000015b0  69 6e 67 20 61 20 6d 65  6e 75 20 6f 72 20 61 6e  |ing a menu or an|
000015c0  20 69 74 65 6d 20 74 68  6f 75 67 68 0a 69 74 20  | item though.it |
000015d0  73 68 6f 75 6c 64 20 6f  6e 6c 79 20 62 65 20 75  |should only be u|
000015e0  73 65 64 20 6f 6e 20 69  74 65 6d 73 2e 4d 65 6e  |sed on items.Men|
000015f0  75 5f 53 65 74 53 75 62  48 61 6e 64 6c 65 0a 50  |u_SetSubHandle.P|
00001600  61 72 61 6d 73 20 3d 3e  0a 20 20 20 20 20 20 20  |arams =>.       |
00001610  20 20 52 31 20 3c 4d 65  6e 75 20 73 74 72 69 6e  |  R1 <Menu strin|
00001620  67 3d 3e 4d 65 6e 75 53  74 72 69 6e 67 73 3e 2f  |g=>MenuStrings>/|
00001630  3c 4d 65 6e 75 20 6c 69  73 74 3d 3e 4d 65 6e 75  |<Menu list=>Menu|
00001640  4c 69 73 74 73 3e 0a 20  20 20 20 20 20 20 20 20  |Lists>.         |
00001650  52 32 20 53 75 62 20 77  69 6e 64 6f 77 20 68 61  |R2 Sub window ha|
00001660  6e 64 6c 65 0a 20 20 20  20 20 20 20 20 20 0a 54  |ndle.         .T|
00001670  68 69 73 20 63 61 6c 6c  20 73 65 74 73 20 75 70  |his call sets up|
00001680  20 73 75 62 20 77 69 6e  64 6f 77 20 28 6f 72 20  | sub window (or |
00001690  64 69 61 6c 6f 67 20 62  6f 78 29 20 68 61 6e 64  |dialog box) hand|
000016a0  6c 65 73 2e 20 49 74 20  72 65 74 75 72 6e 73 0a  |les. It returns.|
000016b0  61 6e 20 65 72 72 6f 72  20 69 66 20 74 68 65 20  |an error if the |
000016c0  69 74 65 6d 20 77 61 73  6e 27 74 20 64 65 66 69  |item wasn't defi|
000016d0  6e 65 64 20 61 73 20 61  20 73 75 62 20 77 69 6e  |ned as a sub win|
000016e0  64 6f 77 2e 0a 0a 4e 6f  20 63 68 65 63 6b 20 69  |dow...No check i|
000016f0  73 20 6d 61 64 65 20 69  66 20 79 6f 75 20 61 72  |s made if you ar|
00001700  65 20 61 63 63 65 73 73  69 6e 67 20 61 20 6d 65  |e accessing a me|
00001710  6e 75 20 6f 72 20 61 6e  20 69 74 65 6d 20 74 68  |nu or an item th|
00001720  6f 75 67 68 0a 69 74 20  73 68 6f 75 6c 64 20 6f  |ough.it should o|
00001730  6e 6c 79 20 62 65 20 75  73 65 64 20 6f 6e 20 69  |nly be used on i|
00001740  74 65 6d 73 2e 4d 65 6e  75 5f 53 74 72 69 6e 67  |tems.Menu_String|
00001750  43 6f 6d 70 61 72 65 0a  50 61 72 61 6d 73 20 3d  |Compare.Params =|
00001760  3e 0a 20 20 20 20 20 20  20 20 20 52 31 20 46 69  |>.         R1 Fi|
00001770  72 73 74 20 73 74 72 69  6e 67 0a 20 20 20 20 20  |rst string.     |
00001780  20 20 20 20 52 32 20 53  65 63 6f 6e 64 20 73 74  |    R2 Second st|
00001790  72 69 6e 67 0a 20 20 20  20 20 20 20 20 20 52 33  |ring.         R3|
000017a0  20 54 65 72 6d 69 6e 61  74 69 6e 67 20 63 68 61  | Terminating cha|
000017b0  72 61 63 74 65 72 0a 20  20 20 20 20 20 20 20 20  |racter.         |
000017c0  52 34 20 4d 61 78 69 6d  75 6d 20 6e 75 6d 62 65  |R4 Maximum numbe|
000017d0  72 20 6f 66 20 63 68 61  72 61 63 74 65 72 73 20  |r of characters |
000017e0  74 6f 20 63 6f 6d 70 61  72 65 20 62 65 66 6f 72  |to compare befor|
000017f0  65 0a 20 20 20 20 20 20  20 20 20 20 20 20 72 65  |e.            re|
00001800  74 75 72 6e 69 6e 67 20  27 65 71 75 61 6c 73 27  |turning 'equals'|
00001810  0a 20 20 20 20 20 20 20  20 20 0a 20 20 20 20 20  |.         .     |
00001820  20 20 5c 3c 3d 0a 20 20  20 20 20 20 20 20 20 52  |  \<=.         R|
00001830  30 20 26 20 52 31 20 41  72 65 20 75 70 64 61 74  |0 & R1 Are updat|
00001840  65 64 2e 20 54 68 65 79  20 77 69 6c 6c 20 70 6f  |ed. They will po|
00001850  69 6e 74 20 74 6f 20 61  66 74 65 72 20 74 68 65  |int to after the|
00001860  0a 20 20 20 20 20 20 20  20 20 74 65 72 6d 69 6e  |.         termin|
00001870  61 74 6f 72 73 20 6f 72  20 61 66 74 65 72 20 74  |ators or after t|
00001880  68 65 20 66 69 72 73 74  20 64 69 66 66 65 72 65  |he first differe|
00001890  6e 63 65 2c 20 64 65 70  65 6e 64 69 6e 67 0a 20  |nce, depending. |
000018a0  20 20 20 20 20 20 20 20  6f 6e 20 74 68 65 20 6f  |        on the o|
000018b0  75 74 63 6f 6d 65 2e 0a  20 20 20 20 20 20 20 20  |utcome..        |
000018c0  20 5a 3d 31 20 66 6f 72  20 27 65 71 75 61 6c 73  | Z=1 for 'equals|
000018d0  27 2c 5a 3d 30 20 66 6f  72 20 27 6e 6f 74 20 65  |',Z=0 for 'not e|
000018e0  71 75 61 6c 73 27 0a 0a  54 68 69 73 20 63 6f 6d  |quals'..This com|
000018f0  70 61 72 65 73 20 74 68  65 20 74 77 6f 20 73 74  |pares the two st|
00001900  72 69 6e 67 73 20 73 70  65 63 69 66 69 65 64 2e  |rings specified.|
00001910  20 54 68 65 20 63 6f 6d  70 61 72 69 73 6f 6e 20  | The comparison |
00001920  69 73 20 63 61 73 65 0a  73 65 6e 73 69 74 69 76  |is case.sensitiv|
00001930  65 2e 20 49 66 20 52 32  20 69 73 20 7a 65 72 6f  |e. If R2 is zero|
00001940  20 6f 6e 20 65 6e 74 72  79 20 74 68 65 6e 20 74  | on entry then t|
00001950  68 65 20 74 68 65 20 63  61 6c 6c 20 77 69 6c 6c  |he the call will|
00001960  20 61 63 63 65 70 74 20  61 6e 79 0a 63 6f 6e 74  | accept any.cont|
00001970  72 6f 6c 20 63 6f 64 65  20 61 73 20 61 20 74 65  |rol code as a te|
00001980  72 6d 69 6e 61 74 6f 72  2e 20 54 68 65 20 63 61  |rminator. The ca|
00001990  6c 6c 20 73 65 74 73 20  74 68 65 20 66 6c 61 67  |ll sets the flag|
000019a0  73 20 73 6f 20 74 68 61  74 20 4e 45 2f 45 51 0a  |s so that NE/EQ.|
000019b0  73 75 66 66 69 78 65 73  20 63 61 6e 20 62 65 20  |suffixes can be |
000019c0  75 73 65 64 20 69 6e 20  6d 61 63 68 69 6e 65 20  |used in machine |
000019d0  63 6f 64 65 20 28 42 41  53 49 43 20 70 72 6f 67  |code (BASIC prog|
000019e0  72 61 6d 6d 65 72 73 20  63 61 6e 20 69 67 6e 6f  |rammers can igno|
000019f0  72 65 0a 74 68 61 74 20  6c 61 73 74 20 62 69 74  |re.that last bit|
00001a00  21 29 4d 65 6e 75 20 53  74 72 69 6e 67 73 0a 54  |!)Menu Strings.T|
00001a10  68 65 73 65 20 63 6f 6e  73 69 73 74 20 6f 66 20  |hese consist of |
00001a20  61 20 73 65 72 69 65 73  20 6f 66 20 7a 65 72 6f  |a series of zero|
00001a30  20 74 65 72 6d 69 6e 61  74 65 64 20 73 74 72 69  | terminated stri|
00001a40  6e 67 73 2e 20 54 68 65  20 65 6e 74 69 72 65 0a  |ngs. The entire.|
00001a50  73 74 72 69 6e 67 20 69  73 20 73 69 6d 69 6c 61  |string is simila|
00001a60  72 20 74 6f 20 74 68 61  74 20 72 65 74 75 72 6e  |r to that return|
00001a70  65 64 20 62 79 20 53 57  49 20 22 3c 57 69 6d 70  |ed by SWI "<Wimp|
00001a80  5f 44 65 63 6f 64 65 4d  65 6e 75 3d 3e 53 57 49  |_DecodeMenu=>SWI|
00001a90  2e 57 69 6d 70 5f 44 65  63 6f 64 65 4d 65 6e 75  |.Wimp_DecodeMenu|
00001aa0  3e 22 20 69 65 2e 0a 22  44 69 73 70 6c 61 79 2e  |>" ie.."Display.|
00001ab0  53 6d 61 6c 6c 20 69 63  6f 6e 73 22 20 66 6f 72  |Small icons" for|
00001ac0  20 61 20 74 79 70 69 63  61 6c 20 66 69 6c 65 72  | a typical filer|
00001ad0  20 6d 65 6e 75 20 73 65  6c 65 63 74 69 6f 6e 2e  | menu selection.|
00001ae0  20 54 68 65 20 6f 6e 6c  79 0a 64 69 66 66 65 72  | The only.differ|
00001af0  65 6e 63 65 73 20 61 72  65 20 74 68 61 74 20 74  |ences are that t|
00001b00  68 65 20 69 6e 69 74 69  61 6c 20 6d 65 6e 75 20  |he initial menu |
00001b10  74 69 74 6c 65 20 69 73  20 70 6c 61 63 65 64 20  |title is placed |
00001b20  62 65 66 6f 72 65 20 74  68 65 0a 73 65 6c 65 63  |before the.selec|
00001b30  74 69 6f 6e 20 73 74 72  69 6e 67 20 69 65 2e 20  |tion string ie. |
00001b40  74 68 65 20 61 62 6f 76  65 20 65 78 61 6d 70 6c  |the above exampl|
00001b50  65 20 77 6f 75 6c 64 20  62 65 63 6f 6d 65 0a 22  |e would become."|
00001b60  46 69 6c 65 72 2e 44 69  73 70 6c 61 79 2e 53 6d  |Filer.Display.Sm|
00001b70  61 6c 6c 20 69 63 6f 6e  73 22 20 61 6c 73 6f 20  |all icons" also |
00001b80  74 68 65 20 64 6f 74 73  20 61 72 65 20 72 65 70  |the dots are rep|
00001b90  6c 61 63 65 64 20 77 69  74 68 20 7a 65 72 6f 0a  |laced with zero.|
00001ba0  62 79 74 65 73 2e 20 41  66 74 65 72 20 61 6c 6c  |bytes. After all|
00001bb0  20 74 68 65 20 73 65 6c  65 63 74 69 6f 6e 20 73  | the selection s|
00001bc0  74 72 69 6e 67 73 20 61  6e 20 65 78 74 72 61 20  |trings an extra |
00001bd0  7a 65 72 6f 20 62 79 74  65 20 69 73 20 61 64 64  |zero byte is add|
00001be0  65 64 0a 73 69 67 6e 69  66 79 69 6e 67 20 74 68  |ed.signifying th|
00001bf0  65 20 65 6e 64 2e                                 |e end.|
00001bf6