Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

(10pts) For each of the following actions, indicate the translation phase during

ID: 3587350 • Letter: #

Question

(10pts) For each of the following actions, indicate the translation phase during which the action takes place (preprocessing, compiling, assembling, linking, or loading). (a) Translating i = i + 1 to addi $t0, $tO, 1 (b) Including the contents of (c) Placing the symbolic names printf in the symbol table and call printf in the relocation table. (d) Allocating space for a. out in main memory. (e) Detecting the syntax error a b c; (f) Creating a. out from main, o and frac.. (g) Expansion of#define PI 3.14159 in the program text. h. (h) Detecting the semantic error a = b, where a is an int and b is a char array. (i) Translating addi $t0, $t0, 1 to 00100001000010000000000000000001. G) Updating the symbol table entry for printf (patching external reference)

Explanation / Answer

a.compiling

b.preprocessing

c.compiling

d.linking or loading(as memory gets allocated at run time not at compilation time)

e.compiling

f.linker or loader

g.preprocessing

h.linking or loadin(as semantic error are not identified at the copilation time it can be only identified at run time)

i.assembling

j.assembling