The MODE statement specifies the addressing mode and the residence
mode for all the entry points into the program module (the main entry
point, its true aliases, and all the alternate entry points). The
syntax of the MODE statement is:
MODE modespec[,modespec]
- modespec
- One or both of the following:
Placement: The MODE control statement can be placed before,
between, or after object modules or other control statements. It must
precede the NAME statement for the module, if one is present.
Note: - If more than one MODE control statement is encountered in the
binding of a program object or load module, the last valid AMODE and
RMODE specifications are used.
- The binder treats AMODE and RMODE values independently until they
are required for output processing. At this time the combination of
AMODE and RMODE values for each entry point are checked for conflict.
See AMODE and RMODE combinations for information on AMODE and RMODE
compatibility.
- The addressing mode assigned by the MODE control statement overrides
the separate addressing modes found in the ESD data for the control
sections within which the entry points are located. The addressing
mode assigned by the MODE control statement overrides the addressing
mode assigned by the AMODE parameter in the PARM field of the EXEC
statement. A specified AMODE value applies to all entry points in
the module, and is stored in all generated directory entries.
- The residence mode assigned by the MODE control statement overrides
the residence mode accumulated from the input control sections and
private code. The residence mode assigned by the MODE control statement
also overrides the residence mode assigned by the RMODE parameter
in the PARM field of the EXEC statement.
A specified RMODE value
applies to the entire module for load modules and single-segment program
objects, unless the SCTR (scatter) option has been specified. For
multiple-segment program objects, the specified RMODE value applies
to all the segments containing initial load classes, unless the scope
value is specified as COMPAT. With COMPAT, the specified RMODE value
is applied only to the initial load segment containing the entry point(s);
any other initial load segments retain the RMODE value as determined
by the binder. See Residence mode for details.
In all cases, the RMODE will be stored in all generated directory
entries.