Question: ::= A | B | C | D | E ::= + | - ::= ::= | ::= = a) Use this to generate the

 ::= A | B | C | D | E ::=

::= A | B | C | D | E ::= + | - ::= ::= | ::= = a) Use this to generate the assembly language code equivalent to this high-level language assignment statement: A = B + C + D - E Every production generates a new temporary semantic record and its corresponding label. Call these TEMP1, TEMP2 etc as in the lecture. Only submit the assembly code including the .DATA lines. All .DATA lines should be initialized to 0. [3 marks] b) Now generate the optimized assembly language which doesn't use these temporary labels. Submit the assembly code including the .DATA lines [2 marks] ::= A | B | C | D | E ::= + | - ::= ::= | ::= = a) Use this to generate the assembly language code equivalent to this high-level language assignment statement: A = B + C + D - E Every production generates a new temporary semantic record and its corresponding label. Call these TEMP1, TEMP2 etc as in the lecture. Only submit the assembly code including the .DATA lines. All .DATA lines should be initialized to 0. [3 marks] b) Now generate the optimized assembly language which doesn't use these temporary labels. Submit the assembly code including the .DATA lines [2 marks]

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!