Download Print this page

IBM 4300 Manual page 270

Processors principles of operation for ecps: vse mode
Hide thumbs Also See for 4300:

Advertisement

For example, assume that the following two fields
are in storage:
2048
2052
Field 1 IC11c21c31c41c51c61c71c81c91cAlcBI
3840
3848
Field 2 IF11F21F31F41F51F61F71F81F91
Also assume:
Register 1 contains 00 002048.
Register 2 contains 00 00 38 40.
With the following instruction, the first eight
bytes of field 2 replace the first eight bytes of field
1:
Machine Format
Op Code
02
L
07
Assembler Format
Op Code
01(L,B 1 ),02(B2)
MVC
0(8,1),0(2)
B2
02
2
I
0001
After the instruction is executed, field 1
becomes:
2048
2052
Field 1 IF11F21F31F41F51F61F71F81C91CAICBI
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:
358
360
With the following MVC instruction, the zeros in
location 358 can be propagated throughout the
entire field (assume that register
11
contains
00 00
03 58):
Machine Format
Op Code
02
L
07
Assembler Format
Op Code
01(L,B 1 ),02(B2)
MVC
1(8,11),0(11)
B2
02
B I 0001
Because the MVC handles one byte at a time,
the above instruction essentially takes the byte at
address 358 and stores it at 359 (359 now contains
00), 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 locations
358-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.
Move (MVI)
The MOVE (MVI) instruction places one byte of .
information from the instruction stream into
storage. For example, the instruction:
Machine Format
Op Code
12
92
5B
I 0001
Assembler Format
Op Code
0l(B 1 ),12
MVI
O(1),C
I $1
may be used, in conjunction with the instruction
EDIT AND MARK, to insert a dollar symbol at the
storage address contained in general register 1 (see
also the example for EDIT AND MARK).
MOVE LONG (MVCL)
The MOVE LONG (MVCL) instruction can be
used for moving data in storage as in the first
example of the MVC instruction, provided that the
two operands do not overlap. MVCL differs from
MVC in that the address and length of each
Appendix A. Number Representation and Instruction-Use ExampJes
A-17

Advertisement

loading