each byte. To illustrate the use of MVZ with overlapping assume that the following data field is in storage: 800 805 I F1 I C2 I F31 C41 F5 I C61 Also assume that register 15 contains 00 00 08 00. The
instruction:
Machine FormatOp Code L B, 0,
0304 001 F 000 Assembler Format Op Code 01 (L, B1), 02 (B2)
MVZ 1(5,15),0(15)
propagates the zone from the byte at address800 through
data field, so that the field becomes:800 805 I F1 I F21 F31 F41 F51 F6 I Multiply (M, MR)
Assume that a number in register 5 is to be multiplied by
the contents of a word at address3750. Initially:
The contents of register 4 are not significant
Register 5 contains00 00 00 9 A = 15410 = the multiplicand
Register 11 contains00 00 30 00 Register 12 contains 00 00 06 00 Storage locations 3750-3753 contain 00 00 00 83 = 13110
= the multiplier
The instruction required for performing the multiplica
tion is:
Machine FormatOp Code R1 X
2
B2150 Assembler Format Op Code R
1
, 02 (X2' B2)
M 4, X'150' (11,12)
After the instruction is executed, registers 4 and 5con tain the product:
Register 4 contains00 00 00 00 Register 5 contains 00 00 4E CE = 20,174
10 Storage locations 3750-3753 are unchanged.
The RR format of the instruction can be used to square
the number in a register. Assume that register 7 contains00 00 00 10 = 16
1 o. The instruction
Machine FormatOp Code R1 R2 1C 16 I 7
Assembler FormatOp Code R
l
, R2
MR 6,7\< multiplies the number in register 7 by itself:
The product,00 00 00 00 00 00 01 00 = 256
10
,
appears in registers 6 and 7.Multiply Halfword (MH)
TheMULTIPLY HALFWORD instruction is used to multi ply the contents of a register by a halfword in storage. For
example, assume that:
Register 11 contains00 00 00 15 = 21
1
0 = the multiplicand
Register 14 contains000001 00 Register 15 contains 00002000 Storage locations 2102-2103 contain FF 09 = -39 = the multiplier
The instruction
Machine Format002 Assembler Format Op Code R
1
, 02 (X
2
, B2)
MH 11,2(14,15)
multiplies the two numbers. The product, FF FFFC CD =
-819 10, replaces the original con tents of registe r 11. Only the low-order 32 bits of a product are stored in a
register; any high-order bits are lost. No programinterrup tion occurs on overflow. OR (0, OR, 01, OC) When the Boolean operator OR is applied to two bits, the
result is one when either bit is one; otherwise, the result is
zero. When two bytes areORed in System/370, each pair of
bits is handled separately; there is no connection from one
bit position to another.OR (01) A frequent use of the OR instruction is to set a particular
bit to one. For example, assume that storage location 4891
contains0100 0010
2
• To set the rightmost bit of this byte
to one without affecting the other bits, the following
instruction can be used (assume that register 8 contains00 00 48 90): Machine Format Op Code 12 96 01 Assembler Format Op Code 01 (B
1
),12 01 1 (8),X'01' 001 Appendix I. Number Representation and Instruction-Use Examples 301
instruction:
Machine Format
03
MVZ 1(5,15),0(15)
propagates the zone from the byte at address
data field, so that the field becomes:
Assume that a number in register 5 is to be multiplied by
the contents of a word at address
The contents of register 4 are not significant
Register 5 contains
Register 11 contains
= the multiplier
The instruction required for performing the multiplica
tion is:
Machine Format
2
B2
1
, 02 (X2' B2)
M 4, X'150' (11,12)
After the instruction is executed, registers 4 and 5
Register 4 contains
10
The RR format of the instruction can be used to square
the number in a register. Assume that register 7 contains
1 o. The instruction
Machine Format
Assembler Format
l
,
MR 6,7
The product,
10
,
appears in registers 6 and 7.
The
example, assume that:
Register 11 contains
1
0 = the multiplicand
Register 14 contains
The instruction
Machine Format
1
, 02 (X
2
, B2)
MH 11,2(14,15)
multiplies the two numbers. The product, FF FF
-819 1
register; any high-order bits are lost. No program
result is one when either bit is one; otherwise, the result is
zero. When two bytes are
bits is handled separately; there is no connection from one
bit position to another.
bit to one. For example, assume that storage location 4891
contains
2
•
to one without affecting the other bits, the following
instruction can be used (assume that register 8 contains
1
),








































































































































































































































































































































