22.02.2015 Views

HLASM Language Reference

HLASM Language Reference

HLASM Language Reference

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Operand Entries<br />

Relocatability of Addresses<br />

If the value of an address expression changes when the assumed origin of the<br />

program is changed, and changes by the same amount, then the address is simply<br />

relocatable. If the addressing expression does not change when the assumed origin<br />

of the program is changed, then that address is absolute. If the addressing<br />

expression changes by some other amount, the address may be complexly<br />

relocatable.<br />

Addresses in the relative-offset or base-displacement form are relocatable,<br />

because:<br />

Each relocatable address is assembled as a signed relative offset from the<br />

instruction, or as a displacement from a base address and a base register.<br />

The base register contains the base address.<br />

If the object module assembled from your source module is relocated, only the<br />

contents of the base register need reflect this relocation. This means that the<br />

location in virtual storage of your base has changed, and that your base<br />

register must contain this new base address.<br />

Addresses in your program have been assembled as relative to the base<br />

address; therefore, the sum of the displacement and the contents of the base<br />

register point to the correct address after relocation.<br />

Absolute addresses are also assembled in the base-displacement form, but always<br />

indicate a fixed location in virtual storage. This means that the contents of the<br />

base register must always be a fixed absolute address value regardless of<br />

relocation.<br />

Machine or Object Code Format<br />

Addresses assembled into the object code of machine instructions have the format<br />

given in Figure 23 on page 90. Not all of the instruction formats are shown in<br />

Figure 23.<br />

The addresses represented have a value that is the sum of a displacement (see<br />

▌1▐ in Figure 23) and the contents of a base register (see ▌2▐ in Figure 23).<br />

Index Register: In RX-format instructions, the address represented has a value<br />

that is the sum of a displacement, the contents of a base register, and the contents<br />

of an index register (see ▌3▐ in Figure 23).<br />

Chapter 4. Machine Instruction Statements 89

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!