switch (c) { case 1: a = 10; break; case 2: a = 20; break; case 3: a = 30; break; default: a = 0; } Translate this piece of C codes into ILOC codes. Variable c and a should be stored in the activation...


switch (c) { case 1: a = 10; break; case 2: a = 20; break; case 3: a = 30; break; default: a = 0; }


Translate this piece of C codes into ILOC codes. Variable c and a should be stored in the activation record. Your translated codes start at address 1000 and grow to larger addresses. The address of a variable in the activation record is r_arp[@name], where r_arp is the register storing the activation record address and @name is the macro for the offset of the variable name.


You may use labels instead of address number in jump/branch instructions.



Jun 11, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here