
10
The Execute File
An execute file is a machine code file occupying up to one sector length of memory (510 bytes).
When loaded from disc it is executed (RANDOMIZE USR) in the PlusDlite RAM, not in the Spectrum
memory, hence giving a programmer the ability to execute utility routines - such as renumbering a
program - without affecting or using the Spectrum memory.
To save a sector length of memory as an execute file, enter:
SAVE D1"filename"X,Address
-
X = the execute file identifier - just type X
-
Address = the location in the Spectrum of the machine-code program, which has been assembled
to run at 15318 (3BD6 hex).
To load and run the execute file, enter:
LOAD D1 "filename" X or LOAD P[n].
After execution, control is returned to the Spectrum.
Streams and Channels
Open a stream
OPEN #S;D[1/2] "filename" [IN/OUT]
This command opens a file on the disc and attach a stream number to it, so that you can print out to
or input from that stream.
-
S = Stream number - from 4 to 16 (type the number only)
-
IN = When you specifically need an input or read file opened
-
OUT = When you specifically need an output or write file opened
If you do not specify IN or OUT, it is an input file if the file-name is found in the catalogue, and an
output file if the file-name is not found.
Also available is Microdrive syntax: OPEN #S;"m";1;"filename"
Closing a stream
CLOSE #*S
This closes the file and stream opened in the previous command.
S = Stream number; if not supplied, then all current open streams will be closed. Note the addition of
the * to Microdrive syntax.
Moving a file
MOVE D[1/2]"filename" TO #S
Moves a file, one sector at a time, to either another file or a stream. This command reads the file and
outputs it to the specified stream.
S = the stream number, from 4 to 16.
MOVE D[1/2]"filename-1" TO D[1/2]"filename-2"
In this case MOVE copies the first file to the second file.
Clearing all open streams and channels
CLEAR #
This command clears all open streams and channels, but it does not CLOSE an output file.
Содержание PlusDlite
Страница 1: ......