CS508 Assignment 1
CS508 Assignment 1
BC170202271
Shahroz Ali
Question Statement
You are required to guess the flow of following IBM mainframe instructions and write the
resultant values of registers (i.e., A, B, C, D and E) and memory locations (i.e., x101,
x102, x103, x104 and x105) after the execution in the tables given below;
Suppose A, B, C, D and E are registers and initially contain the following values;
A=2
B=3
C=4
D=5
E=7
And x101, x102, x103, x104 and x105 are the memory locations, which contain the
following values;
x101 = 10
x102 = 20
x103 = 30
x104 = 40
x105 = 50
Now examine the flow of following IBM instructions (as guided in above discussion);
1) AR A, B // AR = Addition of registers
A = 2+3 = 5
2) MR B, A // MR = Multiplication of registers
B = 3*5 = 15
5) AR C, A // AR = Addition of registers
C = 34+5 = 39
6) SR C, D // SR = Subtraction of registers
C = 39-5 = 34
Registers Values
A 10
B 60
C 99
D 315
E 360