Function
Forms a core image of the binary program contained in a named file.
Format
LOAD file description,COREnumber
The first parameter is optional. If it is null, the command must be issued from a job description file or a macro file and the binary dump must follow the LOAD command and be completely contained within the file containing the LOAD command. If the first parameter is present it must be the name of a card, paper tape, magnetic tape or disc file containing a binary dump.
The CORE parameter is optional and specifies the size of the program being loaded and it overrides the amount specified in the request slip.
Forbidden contexts
NO USER, PROGRAM, BREAK-IN
After the command has been obeyed, the context will be CORE IMAGE.
Execution
The command forms a core image of the binary object program contained in the named file, to which the user must have access in the EXECUTE mode. If there is an existing core image belonging to this job source, it will be deleted; any files open to this core image will be closed, and any peripherals belonging to it will be freed.
If there is no file description parameter, it is assumed that the binary dump immediately follows the LOAD command and is completely contained in the file containing the LOAD command. No traps are required on this file apart from those already required to read and execute the LOAD command. Note that the LOAD command and the binary dump may be enclosed between command delimiters. In all other respects the action is the same as that taken when a file description is given.
If the file is a disc or magnetic tape file, the first program in the file is loaded.
If the file is a magnetic tape file produced by a magnetic tape
compiling system, the first program may be:
If the program loaded has either of the 'retain load peripheral' (bits 0 and 1 of the third word of the request slip) set, for example in an overlay program, and the filename parameter is not null, then LOAD issues an ASSIGN command to connect the file to the program, so in this case, the user must have READ as well as EXECUTE access to the file. If the user is not allowed READ mode access, the internally issued ASSIGN command reports an error. However, the LOAD command is itself obeyed successfully; any previous core image is deleted and the new core image is formed. A program event will result when the program attempts to address the load peripheral if no allowance for the error in the ASSIGN command is made in the job description.
Note: that when a terminal file, whether serial or direct access, is first created the initial traps set include READ and EXECUTE. If, in the above case, the file is successfully ASSIGNed it is positioned correctly by the LOAD command. All peripheral device requests in the request slip are ignored so that all basic peripherals must be allocated by command, apart from the load peripheral as described above. If the file description parameter is omitted, the effect is undefined.
When the size of the program is in excess of the object program quota
(OBJECTQUOTA, an installation parameter), the following message will
be output:
EXECUTION OF YOUR PROGRAM MAY BE DELAYED AS
ITS CORE SIZE EXCEEDS THE PROGRAM QUOTA
Example
LOAD :FRED.PROGFILE
Note
Some programs which have been overlaid from direct access files have the overlay directory word set to zero and a GO entry block with the address of a routine to set up the overlay directory. The command LOAD leaves the program ready to be RESUMEed at this address; this must be done before entering the program in the normal way.
Error Messages
z HAS A CHECKSUM ERROR
z HAS NO ENTRY BLOCK
z HAS NO REQUEST SLIP
z HAS A BLOCK COUNT FAIL
PROGRAM IS TOO BIG
z IS NOT IN BINARY FORMAT
z INAPPROPRIATE/INVALID BLOCK TYPE
FILE NAME PARAMETER NOT APPROPRIATE TO THIS COMMAND
PROGRAM SIZE REQUESTED IS INVALID
FILE z FOUND IS OF THE WRONG PERIPHERAL TYPE
FILE NAME PARAMETER MISSING
PROGRAM IS SPARSE AND CAN ONLY BE LOADED BY GEORGE 4