The compiler assigns a ￿x-up address to eac h de￿ned subroutine or variable sym bol, indicating its position relativ e to the beginning of the module.

Compiled Code

A compiler segregates code and data in to separate areas in a relocatable object module. The individual compiler determines ho w compiled code is organized within it and the con tent is compiler dependent. Data constan ts are stored in the relocatable object module along with code and, thus, are non-modi￿able. T o change compiled code, y ou must recompile the en tire relocatable object module.

Data Variables Information

A relocatable object module con tains information on data requiremen ts. Usually, it describes data types and required data space. The exact t ype of information is compiler dependen t. It is used when initialization of v ariables is requested or when the data space has a common variable, which is a variable that several pieces of code can share.

Unresolved References

Because a compiler processes one source ￿le at a time, it cannot resolv e external references, determine parameter compatibilit y with them, or analyze actual data. This m ust be resolved at link time or run time. The compiler simply lists external references required for execution in a symbol table located in the relocatable object module, allowing y ou to compile a program in several pieces by separately compiling sev eral source ￿les. The sym bol table lists all subroutines and variable names that are de￿ned b y the relocatable object module.

Compiler Libraries

Compiler libraries are used at run time b y every program. On MPE/iX, they are stored in a library named XL.PUB.SYS .

Command to Compile Only

The command to compile a program (without linking, loading, and running it) is the command, follo wed by an optional list of ￿le names. The commands are:

:CCXL:COB85XL:FTNXL:PASXL

If you omit a ￿le from the list, a standard default ￿le is used. The standard default ￿les are:

$STDIN

text￿le

$NEWPASS

object￿le

$STDLIST

list￿le

If you fail to supply a relocatable object module, a compiler opens a new ￿le named

$NEWPASS

and designates it to be a relocatable object module. A t the end of the compilation,

$NEWPASS

is automatically renamed $OLDPASS and saved. Unless you designate di￿eren tly, the compiler listing produced b y the compilation is output to y our job or session list device, so y ou can see any errors.

3-6 Program Development