Making longer programs

Roger Sapolsky
With Notepad loaded, the amount of free space available for the AMPLE program is a meagre 12209 bytes. In fact, the practical limit (marked by the display of 'no room' messages even after entering COMPACT) is somewhat less than this. RUNning the program may then be possible only by returning to the Main menu (which deletes the Notepad module from memory).
I will now describe a simple method which makes considerably bigger AMPLE programs feasible.
I will first assume that the system disc used in the process described is standard (with no modified !BOOT file). The steps are as follows:
a) Type the main part of your program (say, parts a, b and c) as usual. RUN it and debug it thoroughly. If further music parts (say parts d, e and f) remain to be added, put e, f and g at the end of the PLAY sequence.
b) Save the program twice, first naming it say, 'prog1', then 'prog2' the second time.
c) LOAD 'prog2'. Delete a few music parts, after making sure they will not be needed in the creation of parts e, f and g. The memory thus made free should then be large enough to accommodate the new parts.
d) Type parts e, f and g as usual. PLAY them, and make the necessary adjustments until you are satisfied with the result.
e) SAVE the completed 'prog2' in case further modification is needed then
f) SPOOL the program to a text file,
*SPOOL t.prog2 WRITE *SPOOL
g) LOAD 'prog1' and then read in the text file of 'prog2' words,
*EXEC t.prog2
h) You may now RUN the resulting 'prog1', not forgetting to SAVE it!
Using the modified !BOOT file described by Roger Cawkwell ('Saving memory via modules', AMPLINEX 005) will bring a further improvement, since the deletion of both 'MENU' and 'INS1' will free a total of 2068 bytes. For those members who wish to experiment with Roger's method, the few tips which follow may help:
- Don't forget to unlock the !BOOT file with *ACCESS (for beginners only, this one!)
- After deleting the line which loads 'MENU' don't forget to also delete the line which calls 'MAIN'. Without the Main menu, modules can be loaded via the MLOAD command, e.g.,
"PAD" MLOAD
If you delete 'INS1' from the !BOOT file and you then load a program which needs it, it will be loaded automatically.
In conclusion, I think it is essential to be able to enter larger programs at a time when the Music 2000 gives us the possibility of having even more players busy.

Published in AMPLINEX 012, July 1989