Autorom

By Richard Dimond

Originally published in EUG #27

This program was published in Acorn User, January 1992 and I have found it very useful. It allows you to save up to 16 short m/code files in Sideways RAM and these then may be *RUN in the usual way. When this is done, the program is downloaded to the normal address each time. There are &3700 bytes of memory for the programs and a "Too big" error given if there is not enough memory to save a file. A *HELP facility gives the commands to use it and a list of files held in memory. The four commands are:

*CLEARClear memory
*CACHE<filename> Save file
*SCRAP<filename> Delete file
*DATAList files CACHEd with file info

 

The program as published was intended for DFS use as it allowed for a filename of seven characters only. As I usually use ADFS, I found that, if a ten-character filename was entered, while the file was allowed to be *CACHEd, it was not possible to use it as the filename was shortened to 8 characters. Also it was impossible to *SCRAP it and the only way to correct this was to *CLEAR the memory and *CACHE the files again.

While I usually use short filenames, I thought I could modify the program so that it would accept a ten-character filename to avoid this problem. I have now done this with several small changes to the program as this made the totals for the checking need altering too.

As the data for each program needed to be increased by 3 bytes, giving a total of 19 bytes for each index entry, it is not possible to allow for 16 programs, as the length of the index is only 256 bytes and there is now only room for 13.

To use the program, load it into Sideways RAM and press CTRL-BREAK to set it up. You must then enter *CLEAR (RETURN) to set up the memory. If you then enter *DATA you will get the report "&3700 bytes free". After *CACHEing the files, you must then re-save the program.

Richard Dimond, EUG #27