Allan Gardner
As a user of the AMPLE Toolbox utilities I wanted to
incorporate the Toolbox editors into the AMPLE 'main menu'.
I decided that there were some entries in the menu that I
rarely used. (I should say at this point that I use the same M.MENU module
whether I intend to use Music 4000 or not, by including or missing out the installation
of M.M4 in the !BOOT file - see 'Separating AMPLE modules' utility in AMPLINEX
024).
If I am not using the Music 4000 I overlay the 'Keyboard',
'Recorder' and 'Ready system' items in the menu with a short file (generated
with a memory editor), containing entries with 'Text Edit', 'Image Edit' and
'Utils'. If I do intend to use the Music 4000 I overlay the 'Ready system',
'Load' and 'Save' options with another file containing the patch to produce the
TEDIT, IEDIT and UTILS options.
To generate the patch file it is necessary to do some memory
searching on a normally-configured system. Once the M.MENU module has been
INSTALLed it is modified by the system, so any patch generated will only work
if the system is configured in a consistent manner (i.e. modules INSTALLed in
the same order each time - not normally a problem).
Once you have located M.MENU in memory (some things to look
for are 'MENUDISP', '"MDELETE', 'Mixing Desk' or '"MIX"') you
need to find the page at which it starts, as this page is written into the
module at various locations (about 40) on INSTALLation, and this page number
will probably need to be incorporated into your patch.
An example entry in the MENU would contain the following
bytes:
0E begin string (i.e. tokenised ")
09 length of following string **
54 T
65 e
78 x
74 t
20 space
45 E
64 d
69 i
74 t
0E end of string?
09 don't know - but 09 works & 0C removes entry from MENU
22 " (not tokenised)
54 T
45 E
44 D
49 I
54 T
22 " (not tokenised)
8B ) these four tokens appear
90 ) to MDELETE any temporary
11 ) module already loaded,
50 ) followed by "TEDIT"MLOAD TEDIT
37 page where start of M.MENU module is located
(at location &3700 in this case)
09 length of following string **
54 T
65 e
78 x
74 t
20 space
45 E
64 d
69 i
74 t
0E end of string?
09 don't know - but 09 works & 0C removes entry from MENU
22 " (not tokenised)
54 T
45 E
44 D
49 I
54 T
22 " (not tokenised)
8B ) these four tokens appear
90 ) to MDELETE any temporary
11 ) module already loaded,
50 ) followed by "TEDIT"MLOAD TEDIT
37 page where start of M.MENU module is located
(at location &3700 in this case)
** By careful choice of the string length of the new MENU
entries, the patch can (and must) be designed to exactly overlay the original
entries - no gaps or overlaps allowed!
In the !BOOT file you should include the line to *LOAD the
patch file after the modules have been loaded, but before the 'MAIN' command.
One (slight) problem is that the M.UTILS module does not
have a 'UTILS' word defined, so:
"UTILS" MLOAD UTILS
(as performed by the menu selection) will MLOAD the module
correctly but will then give a '!Mistake' error.
To alleviate this problem I have added the following two
lines to my !BOOT file, again just before the 'MAIN' command.
"UTILS" [
"""UTILS""MSHOW"$+ ]
*K.7"LOAD"UTILS"["""UTILS""MSH."$+]|M
*K.7"LOAD"UTILS"["""UTILS""MSH."$+]|M
The first line defines the word 'UTILS' so that the
available utilities are shown after the module is loaded, and the second line
adds the same word to the '"LOAD' definition of function key 7.
In summary, I will admit that it is quite messy to implement,
but once it has been done it is most satisfying to see, and be able to use, the
Toolbox editors in the main menu.
Published in AMPLINEX 025, March 1992