HLASM Language Reference
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Establishing residence and addressing mode

HLASM Language Reference
SC26-4940-06

The AMODE and RMODE instructions specify the addressing mode (AMODE) and the residence mode (RMODE) to be associated with control sections in the object deck. You can specify AMODE for ENTRY, EXTRN, and WXTRN instruction operands if the GOFF option is specified. If OBJ format is used, then AMODE is not valid for ENTRY, EXTRN, or WXTRN instruction operands. AMODE and RMODE can be specified for any CSECT or START operand with either OBJ or GOFF and without restriction on the xMODE operands. These modes can be specified for these types of control sections:
  • Control section (for example START, CSECT)
  • Unnamed control section
  • Common control section (COM instruction)

The assembler sets the AMODE and RMODE indicators in the ESD record for each applicable external symbol in an assembly. The linker stores the AMODE and RMODE values in the bound program. They are later used by the loader program that brings the load module into storage. The loader program uses the RMODE value to determine where it loads the load module, and passes the AMODE value of the executable program's main entry point to the operating system to establish the addressing mode.

z/VM and z/OS
When you specify the GOFF option:
  • The RMODE value specified for a section is by default assigned to the B_TEXT class.
  • The AMODE specified for the section is assigned to an entry point having the section name and the location of the first byte of class B_TEXT.
If the source program defines additional classes, each class might be assigned its own RMODE, and an entry point in any class might be assigned its own AMODE.

For more information about the AMODE and RMODE instructions, see AMODE instruction and RMODE instruction.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014