MAINSAIL Compiler User's Guide, Chapter 1

previous   next   top   contents   index   framed top   this page unframed


1. Introduction

This document describes the MAINSAIL compiler and related MODULEs. The MAINSAIL compiler consists of a set of MODULEs that are independent of the host and target machines and a set of code generation MODULEs that are independent of the host machine but know about the target machine.

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.

1.1. Version

This version of the MAINSAIL Compiler User's Guide is current as of the proposed Version 16.30.1 of MAINSAIL (which has not yet been released).

This document is preliminary. Its contents have been updated to include information about the proposed 16.30.1 release, but the document has not been thoroughly proofread. Please contact XIDAK if you have any questions concerning this document or if you find any errors in it.

previous   next   top   contents   index   framed top   this page unframed

MAINSAIL Compiler User's Guide, Chapter 1