previous next top contents index framed top this page unframed
A MAINSAIL program is a collection of independently compiled MODULEs. The MODULEs are not linked before execution into a single unit as is common for most programming languages. Instead, MAINSAIL dynamically brings MODULEs into memory as needed and takes care of intermodule communication in a machine-independent manner.
The chief outputs of the MAINSAIL compiler are:
MAINSAIL directly executes objmods (they are not linked with a linkage editor). An intmod is produced only if certain non-default compiler options are set, as described later in this document.
Intmods are portable files; an intmod produced on one system may be used (for the same target) on another system. Intmods are target-specific; an intmod compiled for one target operating system cannot be used in compiling for another operating system. Some care must be used in shipping intmods from one system to another, as they may contain special characters that do not appear in ordinary text files; they should therefore be shipped as binary or (in MAINKERMIT) PTEXT files.
Intmods may be stored in intmod libraries, called intlibs, as described in Chapter 18 of the MAINSAIL Utilities User's Guide. When the compiler looks for the intmod for some MODULE FOO, it first searches all open intlibs for FOO. If it does not find the intmod in any open library, it then looks for the file named xxx-int:foo, where xxx is the file abbreviation for the target operating system name abbreviation (as described later, a searchpath is usually used to map this file name to another).
Host machine refers to the machine on which the compiler is running; target machine refers to the machine for which code is being generated.
MAINSAIL Compiler User's Guide, Chapter 1