Chapter Contents |
Previous |
Next |
Linking C Programs |
The
CMS LOAD command is limited in the number and size of pseudoregisters it can
handle. The number and length of the pseudoregisters are directly related
to the number and size of external variables in the program. For example,
an external
int
array with 1000 elements causes a pseudoregister to be created
that is
1000*sizeof(int)
, or 4000 bytes long. C programs that have been compiled
with the
rent
or
rentext
options may, in some cases, produce too many pseudoregisters
or the cumulative length of the pseudoregisters may be too large for the LOAD
command to process.
DMSLIO168S: PSEUDO-REGISTER TABLE OVERFLOW
COOL performs pseudoregister removal; it does not affect
program execution or reentrancy in any way. The
noprem
option suppresses
this function. The COOL output file, COOL370 TEXT, may not be reprocessed
by COOL unless the
noprem
option has been used.
The COOL EXEC |
COOL [filename1 [filename2 ...]] [(options [)]]
where filename1, filename2, and so on are the names of the files that are to be the primary input to COOL. Each file should have a filetype of TEXT and contain either object code or COOL/linkage editor control statements. (INCLUDE statements are an example of control statements, as discussed later in this chapter.) If no filenames are specified, COOL prompts for the name of a primary input file. At the prompt, enter a filename. COOL continues to prompt until a null line is entered.
The CMS LOAD command
may not select the correct entry point for your program. It is usually best
to use the RESET option of the LOAD command to specify the entry point explicitly.
If the main function is the C
main
function and you are using the normal C entry
point, specify RESET MAIN. If you are using the LKED command to link the
program, use the ENTRY control statement to specify MAIN as the entry point.
See Specifying the Correct Entry Point for additional information on defining an entry point.
COOL Listing Output |
A number of COOL options, such as
list
,
prmap
, and
enxref
, cause
output to
be written to the COOL listing file. By default, the COOL listing file is
named COOL370 COOLLIST. The
print
option may be used to direct the listing to
a different file.
Linking All-Resident Programs |
GLOBAL TXTLIB MYLIB LC370STD LC370BAS COOL MAINPROG SUB1 SUB2 (GENMOD TESTPROG
Note:
See All-Resident C Programs for information on how to modify the source of an existing program to exploit
the all-resident library.
The CMS LOAD command may issue the following message:
DMSLIO116S LOADER TABLE OVERFLOW
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright © 2001 by SAS Institute Inc., Cary, NC, USA. All rights reserved.