After the instruction is executed, register 10 contains 00 00 AB CD.
Load Address (LA)
TheLOAD ADDRESS instruction provides a convenient
way to place a nonnegative number4095
1 0 in a register
without first defining the number as a constant and then
using it as an operand. For example, assume that the num
ber2048
10 is to be placed in register 1. One instruction
that will do this is:
Machine Format
4111 1 0 1 0 800 Assembler Format Op Code R
1
• 02 (X
2
• 8
2
)
LA1,2048(0,0) As indicated in the programming note in the instruction
description, theLOAD ADDRESS instruction can also be
used to increment a register by an amount4095 1 0 speci
fied in the D2 field. For example, assume that register 5
contains00 12 34 56.
The instruction:
Machine FormatOp Code R1 X
2
8
2
.OOA Assembler Format Op Code R
1
, 02 (X
2
, 8
2
)
LA 5,10(0,5)
adds10 (decimal) to the contents of register 5 as follows:
Register 5 (old):
D2 field:
Register 5 (new):00 12 34 56 00 00 00 OA 00 12 34 60 Load Halfword (LH)
TheLOAD HALFWORD instruction places unchanged the
contents of a halfword in storage into the right half of a
register. The left half of the register is replaced by zeros or
ones to reflect the sign (leftmost bit) of the halfword.
For example, assume that the two bytes in storage loca
tions1802-1803 are to be loaded into register 6. Also
assume:
Register 6 contains 7F 12 34 56
Register 14 contains00 00 18 02 Locations 1802-1803 contain 00 20 The instruction required to load the register is:
Machine FormatOp Code R1 X
2
82
48I 6 I 0 I E I 000 Assembler Format Op Code R
1
, 02 (X
2
, 8
2
)
LH 6,0(0,14)
After the instruction is executed, register 6 contains00 00 00 20. If 1802-1803 contained a negative number,
for example, A 7 B6, the sign bit would again be propagated
tothe left, giving FF FF A 7 B6 as the final result in regis
ter 6.
Move(MVI) The MOVE (immediate) instruction can place one byte of
information from the instruction stream into any designated
location. For example, if the instruction
Machine FormatOp Code 12 92 FA o 055 Assembler Format Op Code ° 1 (8
1
),12 MVI 85(O),X'FA'
is executed, bits 8-15 of the instruction (11111010
2
) are
copied in storage location85
10
. Move (MVC)
The MVC instruction can be used to move a data field from
one location to another. For example, assume that the fol
lowing two fields are in storage:
Field 12048 2052 1 C1 I C2 I C3 I C4 I C5 I C61 C71 C81 C9 I CA I C8 I Field 2 3840 3848 I F1 I F21 F31 F41 F51 F61 F71 F81 F91 Also assume:
Register 1 contains00 00 20 48
Register 2 contains00 00 38 40 With the following instruction, the first eight bytes of
field 2 replace the first eight bytes of field 1:
Machine FormatOp Code L 8
1
0207 I I 000 000 Appendix I. Number Representation and Instruction-Use Examples 299
Load Address (LA)
The
way to place a nonnegative number
1
without first defining the number as a constant and then
using it as an operand. For example, assume that the num
ber
10
that will do this is:
Machine Format
41
1
•
2
•
2
)
LA
description, the
used to increment a register by an amount
fied in the D2 field. For example, assume that register 5
contains
The instruction:
Machine Format
2
8
2
.
1
, 02 (X
2
, 8
2
)
LA 5,10(0,5)
adds
Register 5 (old):
D2 field:
Register 5 (new):
The
contents of a halfword in storage into the right half of a
register. The left half of the register is replaced by zeros or
ones to reflect the sign (leftmost bit) of the halfword.
For example, assume that the two bytes in storage loca
tions
assume:
Register 6 contains 7F 12 34 56
Register 14 contains
Machine Format
2
82
48
1
, 02 (X
2
, 8
2
)
LH 6,0(0,14)
After the instruction is executed, register 6 contains
for example, A 7 B6, the sign bit would again be propagated
to
ter 6.
Move
information from the instruction stream into any designated
location. For example, if the instruction
Machine Format
1
),
is executed, bits 8-15 of the instruction (1111
2
)
copied in storage location
10
.
The MVC instruction can be used to move a data field from
one location to another. For example, assume that the fol
lowing two fields are in storage:
Field 1
Register 1 contains
Register 2 contains
field 2 replace the first eight bytes of field 1:
Machine Format
1
02








































































































































































































































































































































