Question: 3. (10 p.) Suppose that the target assembly language for a compiler has these 5 instructions (same as in the book on page 62). push
3. (10 p.) Suppose that the target assembly language for a compiler has these 5 instructions (same as in the book on page 62).
push address
add
sub
mul
pop address
Each arithmetic instruction pops an integer into the right operand, then pops an integer into the left operand and pushes the result of the operation on the stack. Translate the following assignments. Standard precedence and associativity rules apply. Process the variables in the same order as they appear in the assignments.
(a) total := a + b c + d
(b) result a b + (c d)
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
