Trailing-Edge
-
PDP-10 Archives
-
BB-BT99U-BB_1990
-
10,7/compil/compil.hlp
There are 8 other files named compil.hlp in the archive. Click here to see a list.
COMPILE command
Function
The COMPILE command produces relocatable binary files (.REL
files) and/or compilation listings for specified source program
files. The system determines which language compiler to use by
the source file extension or by switches you specify in the
command string. If you do not supply any switches in the command
string, but you do use a standard extension, the system uses the
following compilers:
Source File Extension Compiler Used
.ALG ALGOL compiler
.BLI, .B10 BLISS-10 compiler
.CBL COBOL compiler
.F4 or .FOR FORTRAN compiler
.FAI FAIL compiler
.MAC MACRO assembler
.PAL PAL10 compiler
.PAS Pascal compiler
.P11 MACY11 assembler
.SAI SAIL compiler
.SIM SIMULA compiler
.SNO SNOBOL compiler
NOTE
The compiler cannot be changed with a switch, but it
can be specified with a switch when the source file
has an unrecognizable or no extension. If the source
file has a non-standard extension, and you do not
specify the compiler in a switch, FORTRAN is used as
the default compiler. For help on standard file
extensions, see the help file FILEXT.
Usually, the system translates the source file if there is no
corresponding binary (.REL) file, or if the date and time of the
source file is later than the date and time of the binary file.
If the binary file is newer than the source file, the system does
not generate a new .REL file.
This command runs the COMPIL program, which interprets the
command before running the appropriate language compiler.
FAIL, MACY11, SAIL, and SNOBOL are recognized as compilers only
if the appropriate assembly switches are set at your
installation.
Each time you issue the COMPILE, LOAD, EXECUTE, or DEBUG
commands, the system remembers the command, with its arguments,
in a temporary file on disk or in TMPCOR if they are small
enough. When you issue one of these commands without an
argument, it causes the system to use the argument saved in the
temporary file.
The COMPILE command accepts several command constructions: the @
construction (indirect commands), the + construction, the =
construction, and the < > construction. See the help file CONSTR
for a description of each of these constructions.
Format
COMPILE file-spec/switch,file-spec/switch,...
Where: file-spec is a single file specification or a string of
file specifications, separated by commas. The standard
file specification consists of: a device name, a file
name (with or without an extension), and a directory
name. If you omit the file specification argument, the
system uses the argument specified in a previous
COMPILE-class command, if possible.
NOTE
Note that a maximum of 150 processor switch
characters can be passed to the compiler.
You can use the following switches as temporary or permanent
switches. For more help on switches, see the help file SWITCH.
Switches relevant to COMPILE follow; all switches allowed with
COMPILE can be used with LOAD, EXECUTE and DEBUG.
Switch Function
/ALGOL Compiles with ALGOL. Assumed for files with the
.ALG extension.
/BINARY Generates a binary file for each file compiled.
The file name of the binary file is .REL. This is
the default action.
/BLISS Compiles the file with BLISS-10. Assumed for files
with the extension of .B10 and .BLI.
/C68 Compiles with COBOL-68.
/C74 Compiles with COBOL-74.
/COBOL Compiles the file with COBOL. Assumed for files
with the extension of .CBL.
/COMPILE Forces a compilation of this source file even if
the relocatable binary file is newer. Use this
switch to obtain an extra compilation (for example,
to obtain a listing of the compilation). NOCOMPILE
is the default switch.
/CREF Produces a listing file on the disk for each file
compiled, for later processing by the CREF program.
The file extension of the listing file is .CRF.
The file can then be listed with the CREF command.
With COBOL files, the CREF file is appended to the
output file; additional commands are needed to
obtain the cross-referenced file.
/DDT Loads the program debugger DDT with the file.
/DEBUG:(arg, arg,...)
Passes the arguments to FORTRAN. Refer to the
TOPS-10/TOPS-20 FORTRAN Language Manual.
/DLIST Creates a listing file with the extension .LST and
stores it in your disk area. You can have this
file printed on the line printer by using the PRINT
command.
/F66 Applies FORTRAN-66 rules for DO loops and EXTERNAL
statements.
/FAIL Assembles the file with FAIL. Assumed for files
with the .FAI extension.
/FORTRAN Compiles the file with a FORTRAN compiler. Assumed
for files with either the extension of .F4 or .FOR
and for all files with unrecognizable compiler
extensions, if FORTRAN is the standard compiler for
your system. This switch is necessary if the file
has an unrecognizable compiler extension and
FORTRAN is not the standard compiler or is not the
current default.
/FORDDT Loads the FORDDT debugger with the program.
/FOROTS Obsolete
/FORSE
/FUDGE:file Creates a temporary file that contains the library
file name and the names of the .REL files produced
by the command string. When you issue the FUDGE
command, PIP reads this file to generate the
library .REL file. See the TOPS-10 MAKLIB User's
Guide for information about library files.
The argument to /FUDGE is the library file
specification. If you omit the file extension, the
default is .REL.
This switch is permanent (sticky). That is, it
pertains to all .REL files generated by this
command string.
/GFLOAT Indicates that double-precision numbers are to be
stored in G-floating format. This format has an
expanded exponent range. This option is available
on KL10 processors only.
/K?10 Designates the machine on which the program will
execute after it has been loaded. The default is
the processor that is executing the command. The ?
can be replaced by L or S. To designate a KS
processor, use /KS10.
/LIBRARY Loads the program in library search mode.
(/LIBRARY is identical to /SEARCH.)
/LINK Obsolete
/LIST Prints the listing file on the line printer (LPT:).
If the line printer is spooled or available to your
job, the listing file is automatically printed.
/LMAP:file Produces a loader map while loading. The map
contains local symbols.
/MACRO Assembles the file with MACRO. Assumed for files
with the extension of .MAC.
/MACY11 Assembles the file with MACY11. Assumed for files
with the extension .P11. MACY11 is recognized as a
compiler only if the appropriate assembly switch is
set. This switch is not supported.
/MAP:file Produces a loader map while loading. The default
file name is MAP.MAP.
/NEW Runs the appropriate language compiler from the
experimental library area [1,5] (device NEW:). If
the compiler does not exist on device NEW:, COMPIL
tries to obtain it from device SYS:.
/NOBINARY Does not generate binary files. This switch, when
combined with the /CREF or /LIST switch, is useful
when compiling programs solely to generate
listings.
/NOCOMPILE Compiles the source file if there is no relocatable
file newer than the source file. Note that
/COMPILE always compiles, /REL never compiles, and
/NOCOMPILE (the default switch) compiles
conditionally.
/NODEBUG Does not pass previously specified arguments to
FORTRAN.
/NOLIST Does not generate listing files. This is the
default action. Complement to /LIST.
/NOOPTIMIZE Does not optimize the object source code. This is
the default. Complement to /OPTIMIZE.
/NOSEARCH Does not load the program in library search mode.
Complement to /SEARCH.
/OPTIMIZE Optimizes the object code of a FORTRAN program.
/OLD Runs the appropriate language compiler from the
system library [1,3] of old programs (device OLD:).
If the compiler does not exist on device OLD:,
COMPIL tries to obtain it from device SYS:.
/PAL10 Assembles the file with PAL10. Assumed for files
with the .PAL extension.
/PASCAL Compiles the file with Pascal. Assumed for files
with the .PAS extension.
/REL Loads an existing .REL file rather than compiling a
new one. Refer also to /COMPILE and /NOCOMPILE.
b.i-14 /SAIL Compiles the file with SAIL. Assumed
for files with the .SAI extension.
/SAVE Saves the core image to disk in an executable file
after it is loaded.
/SEARCH Loads the program in library search mode. (/SEARCH
is identical to /LIBRARY.)
/SELF Runs the appropriate language compiler from device
DSK: instead of from the system library (device
SYS:). This switch is useful if you keep a private
copy of a compiler in your own disk area.
/SIMULA Compiles the file with SIMULA. Assumed for files
with the .SIM extension.
/SNOBOL Compiles the file with SNOBOL. Assumed for files
with the extension .SNO. SNOBOL is recognized as a
compiler only if the appropriate assembly switch is
set. This switch is not supported.
/SSAVE Saves the core image in a sharable executable file
after the program is loaded.
/SYS Compiles the program with the compiler from SYS:.
This is the default.
Characteristics
Leaves your terminal at monitor level.
Runs the appropriate language compiler, destroying your original
core image.
Restrictions
You cannot use wildcard constructions with COMPILE.
A language compiler appearing more than once within a single
command string cannot access more than one disk area. For
example, the following is invalid:
.COMPILE TESPRG.F10/NEW,SUBRTN.F10/SYS
However, the following is valid:
.COMPILE TESPRG.F10/NEW
.COMPILE SUBRTN.F10/SYS
Examples
1. Compile PROG (with the null extension) with FORTRAN, TEST.MAC
with MACRO, and MANAGE (with the null extension) with MACRO.
A listing file is generated for MANAGE. The files generated
are PROG.REL, TEST.REL, MANAGE.REL, and MANAGE.LST.
.COMPILE PROG,TEST.MAC,MANAGE/MACRO/LIST<RET>
FORTRAN: PROG
MAIN
MACRO: TEST
MANAGE
EXIT
.
2. Compile SIGN.MAC with MACRO, TABLES (with the null extension)
with FORTRAN, and MULTI.ALG with ALGOL. Listing files are
generated for SIGN.MAC and MULTI.ALG.
.COMPILE/LIST SIGN.MAC,TABLES/NOLIST,MULTI.ALG<RET>
MACRO: SIGN
FORTRAN: TABLES
MAIN
ALGOL: MULTI
EXIT
.
3. Compile the files DIVIDE, SUBTRC, and ADD with the FORTRAN
compiler, even if current .REL files exist. Generate files
to be processed by CREF. The files generated are DIVIDE.CRF,
DIVIDE.REL, SUBTRC.CRF, SUBTRC.REL, ADD.CRF and ADD.REL.
.COMPILE/CREF/COMPILE DIVIDE,SUBTRC,ADD<RET>
FORTRAN: DIVIDE
MAIN.
FORTRAN: SUBTRC
MAIN.
FORTRAN: ADD
MAIN.
.
4. Compile the files contained in the command file LIBALL.
Create a temporary file which contains all the .REL file
names and the library file name (MONITR.REL). The FUDGE
command creates the library file, MONITR.REL, with the .REL
files in the same order as they were specified in the command
file.
.COMPILE/FUDGE:MONITR.REL@LIBALL<RET>
FORTRAN: DIVIDE
MAIN.
FORTRAN: SUBTRC
MAIN.
FORTRAN: ADD
MAIN.
.FUDGE<RET>
5. Compile and execute the program NUMBER.FOR.
.COMPILE NUMB2.FOR<RET>
FORTRAN: NUMB2
MAIN.
.EXECUTE
LINK: LOADING
[LNKXCT NUMB2 EXECUTION]
DONE
END OF EXECUTION
CPU TIME: 0.12 ELAPSED TIME: 0.53
EXIT
.