Sometimes, we want a file's execution address to be different from its load
address, perhaps because it is a machine-code program preceeded by data. This
is achieved by adding the execution address last when issuing the *SAVE
command, e.g.:
*SAVE Energy 2000+1000 2100
In this case the execution address is &2100, overriding the default value (which
is the load address).
The final extension to the *SAVE command is the ability to specify a different
loading address, the reload address, for the file. For example:
*SAVE MyR0M 4000+2000 8002 8000
*SAVE Utility 1900 1980 910 900
The first saves memory from &4000 to &5FFF into the file 'MyROM' and gives
it a reload address of &8000 and an execution address of &8002. The second
saves the program 'Utility' between addresses &1900 and &197F with a load
address of &900 and an execution address of &910. Note that you may only
specify a reload address if the execution address is also present.
The *LOAD command has the reverse effect to *SAVE, and it has two
variations. In the first it is simply followed by the name of the file, and the other
information is retrieved from the directory. In the second the load address may
be overridden, thus:
*LOAD MyR0M
*LOAD Utility 700
As we saw earlier, executing a machine-code program can be done with three
different forms of the *RUN command:
*RUN filename
*/filename
*filename
where 'filename' is a pathname which can contain wildcards (which are
interpreted by using the first file which matches). *RUN and */ are exactly
equivalent; they look in the CSD and then the CSL for the named file, and then
load and execute it. If the file cannot be found a 'Bad command' error is
generated. The third form first tests to see if the name corresponds to a ROM
command; otherwise, it behaves as above.
If a file is given an execution address of &FFFFFFFF, it will not be loaded and
executed in response to these commands but will instead be *EXECed, which
process is described below.
F 21