INSTRUCTION FORMAT An instruction is one, two, or three
halfwords in length and must be located
in storage on a halfword boundary. Each
instruction is 1n one of eight basic
formats: RR, RRE, RX, RS, SI, S, SSE,
and SS, with two variations of SSe (See
the figure "Basic Instruction Formats.")
Some instructions contain fields that
vary slightly from the basic format, and
in some instructions the operation
performed does not follow the general
rules stated in this section. All of
these exceptions are explicitly identi­
fied in the individual instruction
descriptions.
Those instruction formats which are unique to instructions associated with
the vector facility are described in the
publication IBM System/370 Vector Oper­ ations, SA22-7125.
The format names indicate, in general
terms, the classes of operands which
participate in the operation: RR denotes a register-and-register
operation.
RRE denotes a register-and-register
operation having an extended
op-code field.
RX denotes a register-and-indexed­
storage operation.
RS denotes a operation.
register-and-storage SI denotes a storage-and-immediate
operation. S denotes an operation using an
implied operand and storage. SS denotes a storage-and-storage
operation. SSE denotes a storage-and-storage
operation having an extended
op-code field.
RR Format
o 8 12 15
RRE Format Op Code
o 16 24 28 31
RX Format
o 8 12 16 20 31
RS Format Op codel Rt
o 8 12 16 20 31
SI Format Op codel o 8 16 20 31 Format Op Code B2 o 16 20 31 SS Format Op Codel l Bl B2 I o 8 16 20 32 36 47 L..-
0
_
p
_C_o _d _B_1 I B, I o 8 12 16 20 32 36 47 Op codel R, R, B, I I B, I o 8 12 16 20 32 36 47 SSE Format o 16 20 32 36 47
Basic Instruction Formats
The first byte or, in the RRE, S, and
of an
For
all SSE formats, the first two bytes
instruction contain the op code.
some instructions in the S format,
or a portion of the second byte
ignored. is The first two bits of the first or only
byte of the op code specify the length
and format of the instruction, as follm.Js: Chapter 5. Program Execution 5-3
Bit Instruction
Positions Length (i n Instruction 0-1 Halfwords) Format 00 One RR 01 Two RX 10 Two RRE/RS/RX/S/SI
11 Three SS/SSE In the format illustration for each individual instruction description, the op-code field shows the op code as hexa­
decimal digits within single quotes. The hexadecimal representation uses 0-9 for the binary codes 0000-1001 and A-F
for the binary codes 1010-1111. The remaining fields in the format
illustration for each instruction are designated by code names, consisting of
a letter and possibly a subscript number. The subscript number denotes
the operand to which the field applies.
Register Operands In the RR, RRE, RX, and RS formats, the contents of the register designated by the Rs field are called the first oper­ and. The register containing the first operand is sometimes referred to as the "first-operand location," and sometimes as "register Rt.n In the RR and RRE
formats, the R2 field designates the
register containing the second operand, and the R2 field may designate the same register as R t . In the RS format, the use of the R3 field depends on the instruction.
The R field designates a general regis­
ter in the general and control
instructions and a floating-point regis­ ter in the floating-point instructions.
I n the i nst ruct ion s L DAD COfHRO Land STORE CONTROL, the R field designates a
control register.
Unless otherwise indicated in the indi­
vidual instruction 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 register), and the second
operand is the same length as the first. Immediate Operands In the SI format, the contents of the eight-bit immediate-data field, the 12 field of the instruction, are used as the second operand. The B t and D t fields specify the first operand, which is one byte in length.
5-4 System/370 Principles of Operation
Storage Operands In the SI, SSE, and SS formats, the
contents of the general register desig­
nated by the B t field are added to the
contents of the D t field to form the
first-operand address. In the S, RS, SSE, and SS formats, the contents of the
general register designated by the B2 field are added to the contents of the D2 field to form the second-operand
address. In the RX format, the contents
of the general registers designated by
the X 2 and B2 fields are added to the
contents of the D2 field to form the
second-operand address.
In the SS format with a single,
eight-bit length field, l 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-256, corresponding to a length code in
l of 0-255. Storage results replace the
first operand and are never stored outside the field specified by the
address and length. In this format, the
second operand has the same length as the first operand, except for the following instructions: EDIT, EDIT AND
MARK, TRANSLATE, and TRANSLATE AND TEST.
In the SS format, with two length fields given, II specifies the number of addi­
tional 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, corre­
sponding to a length code in Lt of 0-15. Similarly, l2 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
outside the field specified by the address and length. If the first oper­ and is longer than the second, the second operand is extended on the left
with zeros up to the length of the first operand. This extension does not modify the second operand in storage.
In the SS format with two R fields, the
contents of the general register speci­ fied by the R t field are a 32-bit unsigned value called the true length.
The operands are of the same length,
called the effective length. The effec­ tive length is equal to the true length
or 256, whichever is less. The
instructions using this format, which are MOVE TO PRIMARY, MOVE TO SECONDARY, and MOVE WITH KEY, set the condition
code to facilitate programming a loop to
move the total number of bytes specified
by the true length.
Previous Page Next Page