Texts: A. Using 1-Address instructions
B. Using 0-Address instructions
Problem 5: [15 Points]
Compute the following expression: X = A + B - C * D
1-Address:
MOVE X, Y
2-Address:
3-Address:
0-Address:
PUSH
MOVE X, X, Y
LOAD M
ADD X, Y
SUB X, Y
ADD X, Y, Z
POP
STORE M
SUB X, Y, Z
ADD
ADD M
MUL X, Y
MUL X, Y, Z
SUB
SUB M
MUL
MUL M
Page 11