When this instruction is executed, the byte in storage is ORed with the immediate byte:
Location 4891:0100 00102 Immediate byte: 0000 0001 2 Result: 0100 00112 The resulting byte with bit 7 set to one is stored in location
4891. Condition code 1 is set.
Pack(PACK) Assume that storage locations 1000-1004 contain the fol
lowing zoned-decimal field that is to be converted to a
packed-decimal field and left in the same location:1000 1004 Zoned Field I F1 I F21 F3 I F41 C5 I Also assume that register 12 contains 00 001000. After
the instruction
Machine Format ___ 00_0 __ ___ Assembler Format
PACK10(5,12) ,0(5,12)
is executed!, the field in locations1000-1004 is in the
packed-decimal format:1000 1004 Packed Field 1 00 1 00 112 1 34 1 5C 1 Notes:
1. This example illustrates the operation ofPACK when the
first- and second-operand fields overlap completely.
2. During the operation, the second operand was extended
with high-order zeros.
Shift LeftDouble (SLDA)
The SHIFT LEFTDOUBLE instruction is similar to SHIFT
LEFT SINGLE except that SLDA shifts the 63 bits (not
including the sign) of an even/odd register pair. The R 1 field
of this instruction must be even. For example, if the con
tents of registers 2 and 3 are:00 7F OA 72 FE DC BA 98 = 0000 0000 0111 1111 0000 1010 0111 0010 1111 1110 1101 1100 1011 1010 1001 1000 2 the instruc tion
Machine Format
01F302 System/370 Principles of Operation
Assembler FormatOp Code R
1
,02 (8
2
)SLOA 2,31(0)
results in registers 2 and 3 both being left-shifted 31 bit po
sitions, so that their new contents are:
7 F 6E 5 D 4C00 00 00 00 = 0111 1111 0110 1110 0101 1101 0100 1100 0000 0000 0000 0000 0000 0000 0000 0000 2 In this case, a significant bit is shifted out of position 1, and
a fixed-point overflow interruption occurs (unlessPSW bit
36 equals zero).
Shift LeftSingle (SLA)
Because the sign bit remains unchanged during an SLA op
eration, this instruction performs an algebraic shift. For
example, if the contents of register 2 are:00 7F OA 72 = 0000 0000 0111 1111 0000 1010 0111 0010 2 then the instruction
Machine Format008 Assembler Format Op Code R
1
,02 (82) SLA 2,8(0)
results in register 2 being shifted left eight bit positions so
that its new contents are:
7FOA 72 00 = 0111 1111 0000 1010 0111 0010 0000 0000 2 If a left shift of nine places had been specified, a significant
bit would have been shifted out of position 1, and a fixed
point overflow interruption might have occurred (unlessPSW bit 36 equaled zero).
Note that register0 does not participate in the operation
and that the contents of the R3 field are ignored.
StoreMultiple (STM)
Assume that the contents of general registers 14, 15,0, and
1 are to be stored in consecutive words starting with loca
tion4050 and that:
Register 14 contains00 00 25 63
Register 15 contains00 01 27 36
Register0 contains 12 43 00 62
Register 1 contains 73 26 12 57
Register 6 contains00 00 40 00 The initial contents of locations 4050405 F are not significant
TheSTORE MULTIPLE instruction allows the use of just
one instruction to store the contents of the four registers
when it is written as:
Location 4891:
4891. Condition code 1 is set.
Pack
lowing zoned-decimal field that is to be converted to a
packed-decimal field and left in the same location:
the instruction
Machine Format
PACK
is executed!, the field in locations
packed-decimal format:
1. This example illustrates the operation of
first- and second-operand fields overlap completely.
2. During the operation, the second operand was extended
with high-order zeros.
Shift Left
The SHIFT LEFT
LEFT SINGLE except that SLDA shifts the 63 bits (not
including the sign) of an even/odd register pair. The R 1 field
of this instruction must be even. For example, if the con
tents of registers 2 and 3 are:
Machine Format
01F
Assembler Format
1
,
2
)
results in registers 2 and 3 both being left-shifted 31 bit po
sitions, so that their new contents are:
7 F 6E 5 D 4C
a fixed-point overflow interruption occurs (unless
36 equals zero).
Shift Left
Because the sign bit remains unchanged during an SLA op
eration, this instruction performs an algebraic shift. For
example, if the contents of register 2 are:
Machine Format
1
,
results in register 2 being shifted left eight bit positions so
that its new contents are:
7F
bit would have been shifted out of position 1, and a fixed
point overflow interruption might have occurred (unless
Note that register
and that the contents of the R3 field are ignored.
Store
Assume that the contents of general registers 14, 15,
1 are to be stored in consecutive words starting with loca
tion
Register 14 contains
Register 15 contains
Register
Register 1 contains 73 26 12 57
Register 6 contains
The
one instruction to store the contents of the four registers
when it is written as: