TAL Programmer's Guide
Compiling Source files
Compiling Programs
14–2 096254 Tandem Computers Incorporated
Compiling
Source Files
Figure 14-1 shows the source file as input to the compiler and the object file as output
from the compiler.
Figure 14-1. Compiling a Source File Into an Object File
Source file Object file
TAL compiler
410
The source file can include SOURCE directives that read in code from other source
files. In effect, you can compile more than one source file into an object file, but the
input to the compiler is always a single source file. The source file and the code that is
read in from other source files by SOURCE directives together compose a compilation
unit.
The compiler accepts information you specify in TACL commands (DEFINE, PARAM,
and ASSIGN) if you issue them before you run the compiler. These commands are
described in Appendix E, “File Names and TACL Commands.”
Running the Compiler To run the compiler, issue a compilation command at the TACL prompt. For example,
you can compile the source file MYSOURCE and have the object code sent to the object
file MYOBJECT as follows:
TAL /IN mysource/ myobject
Following are options you can specify in the compilation command.
IN File Option
In the compilation command, the IN file is the source file. You can specify a file name
or a TACL DEFINE as described in Appendix E. In the preceding example, the IN file
is MYSOURCE.
The IN file can be an edit-format disk file, a terminal, a magnetic tape unit, or a
process. The compiler reads the file as 132-byte records.
If you omit the IN file and the TACL product is in interactive mode, the default file is
your home terminal. In noninteractive mode, the default file is the TACL command
file. For information about the TACL product, see the TACL Reference Manual.
OUT File Option
The OUT file receives the compiler listings. The OUT file can be a disk file (not in edit
format), a terminal, a line printer, a spooler location, a magnetic tape unit, or a process.