[ Previous | Next | Contents | Home | Search ]
AIX Version 4.3 Assembler Language Reference

Explicit-Based Addressing

Explicit-based addresses are specified as a base register number, RA, and a displacement, D. The base register holds a base address. At run time, the processor adds the displacement to the contents of the base register to obtain the effective address. If an instruction does not have an operand form of D(RA), then the instruction cannot have an explicit-based address. Error 159 is reported if the D(RA) form is used for these instructions.

A displacement can be an absolute expression, a relocatable expression, a restricted external expression, or a TOC-relative expression. A displacement can be an external expression only if it is a csect (control section) name or the name of a common block specified defined by a .comm pseudo-op.

Notes:
  1. An externalized label is still relocatable, so an externalized label can also be used as a displacement.
  2. When a relocatable expression is used for the displacement, no RLD entry is generated, because only the offset from the label (that is, the relocatable expression) for the csect is used for the displacement.

Although programmers must use an absolute expression to specify the base register itself, the contents of the base register can be specified by an absolute, a relocatable, or an external expression. If the base register holds a relocatable value, the effective address is relocatable. If the base register holds an absolute value, the effective address is absolute. If the base register holds a value specified by an external expression, the type of the effective address is absolute if the expression is eventually defined as absolute, or relocatable if the expression is eventually defined as relocatable.

When using explicit-based addressing, remember that:

Related Information

Absolute addressing.

Absolute immediate addressing.

Relative immediate addressing.

Implicit-Based addressing.

Location Counter.

Branch Processor.

The bcctr or bcc (Branch Conditional to Count Register) instruction, bclr or bcr (Branch Conditional Link Register) instruction, b (Branch) Instruction, bc (Branch Conditional) instruction.

The .using pseudo-op, .drop pseudo-op.


[ Previous | Next | Contents | Home | Search ]