Question: can you solve all Step 1 Begin by making a copy of the file called trap.handler: call the copy trap.handler.original. You will work on the

Step 1 Begin by making a copy of the file called trap.handler: call the copy trap.handler.original. You will work on the file trap.handler which the SPIM simulator loads by default. Look at the file and, based on what you see, try Page 8 of 12 COMPUTER ORGANIZATION \& ASSEMBLY CS203 Sunday, NOV ZT.2022 to answer a few questions. The '.setnoat' assembler directive instructs the assembler not to complain about using the sat register (which is reserved for the assembler'. s usage). using the sat register (which is reserved for the assembler's usage). Q1: An exception handler needs to save the registers it may change. Can this be done on the stack, using \$sp? Explain. Q2: Is the exception handler you find in the file trap.handler reentrant or not? Explain. A possible comment in the code that says the handler is not reentrant is not a good argument! There are several possible explanations, but you need provide only one. Q3: Since a syscal1 creates an exception, do you think it is appropriate to have syscalls inside an exception handler? Explain. Q4: Is there any code in the exception handler that: actually does print an integer (print int)? True, there are calls to print int, but where are they handled? Q5: Why is there a need to check whether the EPC Is word al igned
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
