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


Relocatability of addresses

HLASM Language Reference
SC26-4940-06

If the value of an address expression changes when the assumed origin of the program is changed, and changes by the same amount, then the address is "simply relocatable". If the addressing expression does not change when the assumed origin of the program is changed, then that address is "absolute". If the addressing expression changes by some other amount, the address is "complexly relocatable".

Addresses in the relative-offset or base-displacement form are relocatable, because:
  • Each relocatable address is assembled as a signed relative offset from the instruction, or as a displacement from a base address and a base register.
  • The base register contains the base address.
  • If the object module assembled from your source module is relocated, only the contents of the base register need reflect this relocation. This means that the location in virtual storage of your base has changed, and that your base register must contain this new base address.
  • Addresses in your program have been assembled as relative to the base address; therefore, the sum of the displacement and the contents of the base register point to the correct address after relocation.

Absolute addresses are also assembled in the base-displacement form, but always indicate a fixed location in virtual storage. This means that the contents of the base register must always be a fixed absolute address value regardless of relocation.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014