The AMODE instruction specifies the addressing mode associated
with control sections in the object deck.
>>-+------+--AMODE--+-24----+----------------------------------><
'-name-' +-31----+
+-64----+
+-ANY---+
+-ANY31-+
'-ANY64-'
- name
- Is the name field that associates the addressing mode with a control
section, or, if GOFF is specified, an ENTRY symbol or EXTRN symbol.
If GOFF is specified, AMODE can also associate an addressing mode
with an entry name. If there is a symbol in the name field, it must
also appear in the name field of a START, CSECT, RSECT, or COM instruction.
If GOFF is specified, the symbol can also appear as the operand of
an ENTRY, EXTRN, or WXTRN instruction,
in this assembly. If the name field is space-filled, there must be
an unnamed control section in this assembly. If the name field contains
a sequence symbol (see Symbols for details),
it is treated as a blank name field.
- z/VM and z/OS
- If the extended object format is being generated (GOFF assembler
option), name is a relocatable symbol that
names an entry point specified on an ENTRY instruction, or on an external
symbol specified on an EXTRN instruction.
- 24
- Specifies
that 24 bit addressing mode is to be associated with a control section,
or entry point.
- 31
- Specifies
that 31 bit addressing mode is to be associated with a control section,
or entry point.
- 64
- Specifies
that 64 bit addressing mode is to be associated with a control section,
or entry point (see 64 bit addressing mode).
- ANY
- The
same as ANY31.
- ANY31
- The
control section or entry point is not sensitive to whether it is entered
in AMODE 24 or AMODE 31.
- ANY64
- The
control section or entry point is not sensitive to whether it is entered
in AMODE 24, AMODE 31, or AMODE 64.
Any field of this instruction can be generated by a macro, or by
substitution in open code.
If symbol denotes an ordinary symbol,
the ordinary symbol associates the addressing mode with an external
symbol. The ordinary symbol must also appear in the name field of
a START, CSECT, RSECT, or COM instruction or, if GOFF is specified,
the operand of an ENTRY, EXTRN, or WXTRN instruction, in
this assembly.
If
symbol is not specified, or if
name is
a sequence symbol, there must be an unnamed control section in this
assembly.
Notes: - AMODE can be specified anywhere in the assembly. It does not
initiate an unnamed control section.
- AMODE is permitted on external labels (EXTRNs) and Entry labels
for both GOFF formats and Parts for GOFF formats.
- An assembly can have multiple AMODE instructions; however, two
AMODE instructions cannot have the same name field.
- The valid and invalid combinations of AMODE and RMODE are shown
in the following table. Combinations involving AMODE 64 and RMODE
64 are subject to the support outlined in 64 bit addressing mode.
Table 1. AMODE/RMODE combinations |
RMODE 24 |
RMODE 31 |
RMODE 64 |
---|
AMODE 24 |
OK |
invalid |
invalid |
AMODE 31 |
OK |
OK |
invalid |
AMODE ANY|ANY31 |
OK |
OK |
invalid |
AMODE 64|ANY64 |
OK |
OK |
OK |
- AMODE or RMODE can only be specified for an unnamed control section
by specifying a sequence symbol or a space in the name field.
- The defaults used when there is no mode or one MODE is specified
are shown in the following table. Combinations involving AMODE 64
and RMODE 64 are subject to the support outlined in 64 bit addressing mode.
Table 2. AMODE/RMODE defaultsSpecified |
Default |
---|
Neither |
AMODE 24, RMODE 24 |
AMODE 24 |
RMODE 24 |
AMODE 31 |
RMODE 24 |
AMODE ANY|ANY31 |
RMODE 24 |
RMODE 24 |
AMODE 24 |
RMODE 31 (was ANY) |
AMODE 31 |
AMODE 64 |
RMODE 31 |
AMODE ANY64 |
RMODE 31 |
RMODE 64 |
AMODE 64 |