In this exercise we will invent a new System/z instruction and your task will be to implement
the class that supports it. The new instruction will be called MVC2 and is an SS2 instruction.
The instruction is a variation on the regular MVC. Here are the instruction semantics:
- Since the instruction is of type SS2, each operand contributes a length, say l1 and l2.
- If the length of both operands are equal (l1 = l2), the operation is identical to MVC.
- If the length of operand 1 is greater than the length of operand 2 (l1 > l2), then after
moving l2 bytes into operand 1, it begins to pad blanks for l1 - l2 bytes.
- If the length of operand 1 is less than the length of operand 2, the instruction functions
just like MVC.
- Build a class called MVC2 that extends SS2Instruction, then your can use the code in MVC
as and perhaps AP as a model of what needs to be built in the execute() method.
- Build three object code programs that exercise your new class. Include programs that
use MVC2 when l1 = l2, l1 > l2, and l1 < l2. Write a fourth object code program where the
source and target fields overlap.