Next: s390 Formats, Previous: s390 Mnemonics, Up: s390 Syntax [Contents][Index]

#### 9.40.3.3 Instruction Operands

Instruction operands can be grouped into three classes, operands located in registers, immediate operands, and operands in storage.

A register operand can be located in general, floating-point, access, or control register. The register is identified by a four-bit field. The field containing the register operand is called the R field.

Immediate operands are contained within the instruction and can have 8, 16 or 32 bits. The field containing the immediate operand is called the I field. Dependent on the instruction the I field is either signed or unsigned.

A storage operand consists of an address and a length. The address of a storage operands can be specified in any of these ways:

- The content of a single general R
- The sum of the content of a general register called the base register B plus the content of a displacement field D
- The sum of the contents of two general registers called the index register X and the base register B plus the content of a displacement field
- The sum of the current instruction address and a 32-bit signed immediate field multiplied by two.

The length of a storage operand can be:

- Implied by the instruction
- Specified by a bitmask
- Specified by a four-bit or eight-bit length field L
- Specified by the content of a general register

The notation for storage operand addresses formed from multiple fields is as follows:

`Dn(Bn)`

  the address for operand number n is formed from the content of general register Bn called the base register and the displacement field Dn.

`Dn(Xn,Bn)`

  the address for operand number n is formed from the content of general register Xn called the index register, general register Bn called the base register and the displacement field Dn.

`Dn(Ln,Bn)`

  the address for operand number n is formed from the content of general register Bn called the base register and the displacement field Dn. The length of the operand n is specified by the field Ln.

The base registers Bn and the index registers Xn of a storage operand can be skipped. If Bn and Xn are skipped, a zero will be stored to the operand field. The notation changes as follows:

    full notation
    short notation
    Dn(0,Bn)
    Dn(Bn)
    Dn(0,0)
    Dn
    Dn(0)
    Dn
    Dn(Ln,0)
    Dn(Ln)

Next: s390 Formats, Previous: s390 Mnemonics, Up: s390 Syntax [Contents][Index]