index, and displacement, designated by the B, X,
and D fields, respectively, in the instruction.
For purposes of describing the execution of in
structions:, operands are designated as first and sec
ond operands and, in some cases, third operal11ds.
Ingeneral, two operands participate in an instruc
tion execlLltion, and the result replaces the first oper
and. Anexception is instructions with "store" in the
name, where the result replaces the second operand.
Except for storing the final result, the contents of all
registers and storage locations participating in the
addressing or execution part of an operation remain
unchanged.Instruction Format
Aninstruction is one, two, or three halfwords in
length and must be located in main storage on an
integral h:alfword boundary. Each instruction is in
one of six basic formats: RR, RX,RS, SI, S, and SS, with two variations of SS. Some instructions contain fields that vary slightly
from the basic format, and in some instructions the
operation performed does not follow the general
rulesstated in this section. All such exceptions are
explicitly identified in the individual instruction de
scriptions.. The format names express, in general terms, the
classes of operands which participate in the opera
tion: RR denotes a register-to-register operation;
RX, a register-and-indexed-storage operation;RS, a
register-and-storage operation;SI, a storage-and operation; and SS, a storage-to-storage
operation. TheS format denotes an operation using
an implied operand and storage.
ThefirHt byte and, in the S format, the first two
bytes of an instruction contain the operation code
(op code). For some instructions in theS format, all
or a portion of the second byte is ignored. The: first
two bitsof the operation code specify the length and
format of an instruction, as follows:
Bit Positions Instruction Instruction0-1 Length Format 00 One halfword RR 01 Two halfwords RX 10 Two halfwords RS/SI/S/RX 11 Three halfwords SS In the format illustration for each individual in
struction description, the op-code field shows the op
code in hexadecimal representation. The hexadeci
mal representation uses one graphic for afour-bit code, and therefore two graphics for an eight-bit
byte. The graphics0-9 are used for the codes 0000- 1001; the graphics A-F are used for codes 1010- 1111. 20 System/370 Principles of Operation
The remaining fields in the format illustration for
each instruction are designated by code names, con
sisting of a letter and possibly a subscript number.
The subscript number denotes the operand to which
the field applies.
Register Operands
In the RR, RX, andRS formats? the contents of the
register designated by the Rt field are called the first
operand. In the RR format, theRl field designates
the register containing the second operand, and the
same register may be designated for the first and
second operand. In theRS format, the use of the R3
field depends on the instruction.
The R field designates a general register in the
general instructions and a floating-point register in
the floating-point instructions. In the instructionsLOAD CONTROL and STORE CONTROL the R
field designates a control register.
Unless otherwise indicated in the individual in
struction description, the register operand is one
register in length (32 bits for a general register or a
control register and 64 bits for a floating-point regis
ter), and the second operand is the same length as
the first.
Immediate Operands
In theSI format, the contents of the eight-bit
immediate-data field, theIz field of the instruction,
are used directly as the second operand. The B t and
Dt fields designate the first operand, which is one
byte in length.Storage Operands
In theSI and SS formats, the contents of the general
register designated by the Bt field are added to the
contents of the Dl field to form the first-operand
address. In theS, RS, and SS formats, the contents
of the general register designated by theBl field are
added to the contents of theDl field to form the
second-operand address. In the RX format, the con
tents of the general registers designated by the X2
andBl fields are added to the contents of the Dl field to form the second-operand address.
In theSS format, with two length fields given, Ll
specifies the number of additional operand bytes to
the right of the byte designated by the first-operand
address. Therefore, the length in bytes of the first
operand is 1-16, corresponding to a length code in
Ll of0-15. Similarly, Ll specifies the number of
additional operand bytes to the right of the location
designated by the second-operand address. Results
replace the first operand, and are never stored out
side the field specified by the address and length. In
the event the first operand is longer than the second,
and D fields, respectively, in the instruction.
For purposes of describing the execution of in
structions:, operands are designated as first and sec
ond operands and, in some cases, third operal11ds.
In
tion execlLltion, and the result replaces the first oper
and. An
name, where the result replaces the second operand.
Except for storing the final result, the contents of all
registers and storage locations participating in the
addressing or execution part of an operation remain
unchanged.
An
length and must be located in main storage on an
integral h:alfword boundary. Each instruction is in
one of six basic formats: RR, RX,
from the basic format, and in some instructions the
operation performed does not follow the general
rules
explicitly identified in the individual instruction de
scriptions
classes of operands which participate in the opera
tion: RR denotes a register-to-register operation;
RX, a register-and-indexed-storage operation;
register-and-storage operation;
operation. The
an implied operand and storage.
The
bytes of an instruction contain the operation code
(op code). For some instructions in the
or a portion of the second byte is ignored. The: first
two bits
format of an instruction, as follows:
Bit Positions Instruction Instruction
struction description, the op-code field shows the op
code in hexadecimal representation. The hexadeci
mal representation uses one graphic for a
byte. The graphics
The remaining fields in the format illustration for
each instruction are designated by code names, con
sisting of a letter and possibly a subscript number.
The subscript number denotes the operand to which
the field applies.
Register Operands
In the RR, RX, and
register designated by the Rt field are called the first
operand. In the RR format, the
the register containing the second operand, and the
same register may be designated for the first and
second operand. In the
field depends on the instruction.
The R field designates a general register in the
general instructions and a floating-point register in
the floating-point instructions. In the instructions
field designates a control register.
Unless otherwise indicated in the individual in
struction description, the register operand is one
register in length (32 bits for a general register or a
control register and 64 bits for a floating-point regis
ter), and the second operand is the same length as
the first.
Immediate Operands
In the
immediate-data field, the
are used directly as the second operand. The B t and
Dt fields designate the first operand, which is one
byte in length.
In the
register designated by the Bt field are added to the
contents of the Dl field to form the first-operand
address. In the
of the general register designated by the
added to the contents of the
second-operand address. In the RX format, the con
tents of the general registers designated by the X2
and
In the
specifies the number of additional operand bytes to
the right of the byte designated by the first-operand
address. Therefore, the length in bytes of the first
operand is 1-16, corresponding to a length code in
Ll of
additional operand bytes to the right of the location
designated by the second-operand address. Results
replace the first operand, and are never stored out
side the field specified by the address and length. In
the event the first operand is longer than the second,