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


Index register

HLASM Language Reference
SC26-4940-06

In RX-format instructions, the address represented has a value that is the sum of a displacement, the contents of a base register, and the contents of an index register (see  3  in Figure 1).
Figure 1. Format of addresses in object code
Format │ Coded or Symbolic │                               Object Code
       │ Representation of │                               Representation
       │ Explicit Address  │                               of Addresses
───────┼───────────────────┼──────────────────────────────────────────────────────────────────────────────
       │                   │
       │                   │ │8 bits     │4    │4    │4    │12 bits          │4    │12 bits          │
       │                   │ │Operation  │bits │bits │bits │Displacement     │bits │Displacement     │
       │                   │ │Code       │     │     │Base │                 │     │                 │
       │                   │ │           │     │     │Reg. │                 │     │                 │
       │                   │ ├───────────┼─────┼─────┼─────┼─────────────────┼─────┼─────────────────┤
       │                   │ │           │     │     │  2  1         │     │                 │
       │                   │ │           │     │     │  VV         │     │                 │
       │                   │ ├ ─ ─ ─ ─ ─ ┼ ─ ─ ┼ ─ ─ ┼─────┼─────────────────┤     │                 │
RS     │ D₂(B₂)            │ │OP CODE    │  R₁R₃B₂D₂        │     │                 │
       │                   │ ├ ─ ─ ─ ─ ─ ┴ ─ ─ ┴ ─ ─ ┴─────┴─────────────────┤     │                 │
       │                   │ │                    ┌── 3  (Index Register)    │     │                 │
       │                   │ │                    V                          │     │                 │
       │                   │ ├ ─ ─ ─ ─ ─ ┬ ─ ─ ┬ ─ ─ ┬─────┬─────────────────┤     │                 │
RX     │ D₂(X₂,B₂)         │ │OP CODE    │  R₁X₂B₂D₂        │     │                 │
       │                   │ ├ ─ ─ ─ ─ ─ ┴ ─ ─ ┴ ─ ─ ┴─────┴─────────────────┤     │                 │
       │                   │ │                                               │     │                 │
       │                   │ │                                               │     │                 │
       │                   │ ├ ─ ─ ─ ─ ─ ┬ ─ ─ ─ ─ ─ ┬─────┬─────────────────┤     │                 │
SI     │ D₁(B₁)            │ │OP CODE    │    I₂B₁D₁        │     │                 │
       │                   │ ├ ─ ─ ─ ─ ─ ┴ ─ ─ ─ ─ ─ ┴─────┴─────────────────┤     │                 │
       │                   │ │                                               │  2  1         │
       │                   │ │                                               │  VV         │
       │                   │ ├ ─ ─ ─ ─ ─ ┬ ─ ─ ─ ─ ─ ┬─────┬─────────────────┼─────┼─────────────────┤
SS     │ D₁(,B₁),D₂(B₂)    │ │OP CODE    │     L     │  B₁D₁B₂D₂        │
       │                   │ ├ ─ ─ ─ ─ ─ ┴ ─ ─ ─ ─ ─ ┴─────┴─────────────────┴─────┴─────────────────┤
I₂
Represents an immediate value
L
Represents a length
B₂, R₁, and R₃
Represent registers

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014