Machine Format Op Code R, 48 6 o E 0001 Assembler Format
lH6,0(0,14) After the instruction is executed,
register 6 contains00 00 00 20. If
locations1803-1804 had contained a
negative number, for example, A7 B6, a
minus sign would have been propagated to
the left, giving FF FF A7 B6 as the
final result in register 6.MOVE (MVC, MVI) MVC Example
TheMOVE (MVC) instruction can be used
to move data from one storage location
to another. For example, assume that
the following two fields are in storage:2048 2052 Fii
ld\ C1 IC2IC3IC4IC5IC6IC7IC8IC9ICAICBI 3840 3848 IFI1F21F31F41F51F61F71F81F91 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
0207 1 000 I 2 0001 Assembler Format MVC 0(8,1),0(2) After the instruction is executed, field
1 becomes:2048 2052 Fii
ldI F1 IF21F31F41F51F61F71F81C91CAICBI Field 2 is unchanged. MVC can also be used to propagate a byte
through a field by starting the firstĀ
operand field one byte location to the
right of the second-operand field. For
example, suppose that an area in storage
starting with address 358 contains the
following data:
358360 100lFI1F21F31F41F51F61F71F81 With the following MVC instruction, the
zeros in location 358 can be propagated
throughout the entire field (assume that
register 11 contains00 00 03 58):
Machine FormatOp Code l
0207 B 0011 B 0001 Assembler Format MVC 1(8,11),0(11)
BecauseMVC is executed as if one byte
were processed at a time, the above
instruction, in effect, takes the byte
at address 358 and stores it at 359 (359
now contains00), takes the byte at 359
and stores it at 35A, and so on, until
the entire field is filled with zeros.Note that an MVI instruction could have
been used originally to place the byte
of zeros in location 358.
Notes:
1. Although the field occupying
locations358-360 contains nine
bytes, the length coded in the
assembler format is equal to the
number of moves (one less than the
field length).
2. The order of operands is important
even though only one field is
involved.
MVI Example
TheMOVE (MVI) instruction places one
byte of information from the instruction
Appendix A. Number Representation and Instruction-Use Examples A-21
lH
register 6 contains
locations
negative number, for example, A7 B6, a
minus sign would have been propagated to
the left, giving FF FF A7 B6 as the
final result in register 6.
The
to move data from one storage location
to another. For example, assume that
the following two fields are in storage:
ld
Register 1 contains
Register 2 contains
first eight bytes of field 2 replace the
first eight bytes of field 1:
Machine Format
02
1 becomes:
ld
through a field by starting the firstĀ
operand field one byte location to the
right of the second-operand field. For
example, suppose that an area in storage
starting with address 358 contains the
following data:
358
zeros in location 358 can be propagated
throughout the entire field (assume that
register 11 contains
Machine Format
02
Because
were processed at a time, the above
instruction, in effect, takes the byte
at address 358 and stores it at 359 (359
now contains
and stores it at 35A, and so on, until
the entire field is filled with zeros.
been used originally to place the byte
of zeros in location 358.
Notes:
1. Although the field occupying
locations
bytes, the length coded in the
assembler format is equal to the
number of moves (one less than the
field length).
2. The order of operands is important
even though only one field is
involved.
MVI Example
The
byte of information from the instruction
Appendix A. Number Representation and Instruction-Use Examples A-21