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


How to use the USING instruction

HLASM Language Reference
SC26-4940-06

Specify the USING instruction so that:
  • All the required implicit addresses in each control section lie within a USING range.
  • All the references for these addresses lie within the corresponding USING domain.

You could, therefore, place all ordinary USING instructions at the beginning of the control section and specify a base address in each USING instruction that lies at the beginning of each control section.

For Executable Control Sections: To establish the addressability of an executable control section defined by a START or CSECT instruction, specify a base address and assign a base register in the USING instruction. At execution time, the base register must be loaded with the correct base address.

If a control section requires addressability to more than 4096 bytes, you must assign more than one base register, or make implicit references using only instructions supporting 20 bit displacements ("long displacements"). This establishes the addressability of the entire control section with one USING instruction.

For Reference Control Sections: A dummy section is a reference control section defined by the DSECT instructions. To establish the addressability of a dummy section, specify the address of the first byte of the dummy section as the base address, so that all its addresses lie within the pertinent USING range. The address you load into the base register must be the address of the storage area being described by the dummy section. However, if all references to fields within the DSECT are made with instructions supporting long displacements, the base address need not be the first byte of the dummy section.

When you refer to symbolic addresses in the dummy section, the assembler computes displacements accordingly. However, at execution time, the assembled addresses refer to the location of real data in the storage area.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014