$29
This assignment is in three parts:
Part A
Write a program that does the following:
• Declare a fullword LEFT with the value 169.
• Declare a fullword RIGHT with the value 74.
• Subtract RIGHT from LEFT. To do this, simply load these numbers into registers and use an SR.
• Add LEFT to RIGHT. To do this, load the two numbers into registers (a different pair of registers) and use an AR.
• Now use an XDUMP to dump out the registers and look at the register values to see your answer.
Part B
Modify the program from Part A as follows:
• Declare two consecutive fullwords of storage called DIFF and SUM.
• Store (ST) the first answer (LEFT minus RIGHT) into DIFF.
• Store (ST) the second answer (LEFT plus RIGHT) into SUM.
• XDUMP that area of storage (containing DIFF and SUM) using XDUMP. You can use XDUMP to print the results in storage by using the label followed by the length of the field like this: XDUMP LEFT,8.
• Go into the XDUMP output and verify your math is correct.
Part C
Now rewrite your program using explicit addressing. This means on the L and ST, take out your labels and fill in the addresses of the various fullwords. You can get these addresses from the program listing of part B.
Other Notes
Hint: Start with the JCL and the trivial little program we had in the lab training exercise. Take out the two SR lines and put in what you need.
Be sure your name and the assignment number (including Part A, B or C) is included in the documentation for each file.
Turn in all three programs (from Parts A, B and C) and the output file from Part C.