After program source has been stored in a file, the following steps are necessary before the program can be used:
TOPS-20 EXEC provides a number of commands to simplify the above process and automate the management of the various versions of program files produced.
Compile one or more program source files and produce relocatable binary object (.REL) file(s). The correct compiler will be selected based on file type. If you use the standard file types for your ALGOL, COBOL, FORTRAN, or MACRO program (.ALG, .CBL, .FOR, .MAC, respectively), you can omit the file type and the system will search for your program source based on the specified file name.
Load the specified .REL file(s) into memory.
@LINK will be invoked automatically if multiple object files are loaded.
If a .REL file does not exist, or if the corresponding source file has been updated more recently than the .REL file, compile the program source and load the resulting object file.
(The program is not run after loading and linking.)
If an executable file is specified and exists (default file type is .EXE), run the executable file. If a .EXE file exists, the
@RUN command is unnecessary: Typing the file name by itself will cause EXEC to run the executable.
If no file is specified, run the program currently loaded in memory.
@RUN – or – filename
Save the program currently loaded into memory as an executable .EXE file. The default file name is the same as the loaded object file's.
Saving the executable allows the program to be run later without having to compile or load/link the program.
Executable files must be saved immediately after the object file is loaded and linked, and BEFORE the loaded program is run.
If object (.REL) file(s) for the specified file(s) exit and are up-to-date, load, link, and run. If there is no object file, or the object file has been updated less recently than the corresponding source file, compile the program source and load, link, and run the resulting object file.
The EXEC compilation commands can invoke any of the following compilers. The compiler will be selected based on the type of the file specified, or the default selection can be overridden by specifying the command switch for the desired compiler.
|Default file type(s)
: The system will automatically search for source files with these standard types and run the appropriate compiler if you omit the file type(s) when you run @COMPILE, @LOAD, or @EXECUTE.