Question: Write a program to evaluate the arithmetic expression [X=(A+B-C) times(D-E)] Make effective use of the registers to minimize the number of MOVE or LD instructions
Write a program to evaluate the arithmetic expression
\[X=(A+B-C) \times(D-E)\]
Make effective use of the registers to minimize the number of MOVE or LD instructions where possible.
(a) Assume a register-to-register architecture with three-address instructions. The operand order for subtraction, SUB, is difference, minuend, subtrahend.
(b) Assume a memory-to-memory architecture with two-address instructions.
(c) Assume a single-accumulator computer with one-address instructions.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
