Question: computer science 270 final : May 17, 2018 Put your name at the top of the exam. Answer all questions. The exam is graded out
computer science 270 final : May 17, 2018 Put your name at the top of the exam. Answer all questions. The exam is graded out of a total of 100 points. Question 1. (30 points) Translate the non-eaf function below to MIPS assembler. Fill in the table (with respect to the scope of doit()) below of whore your variablos are. Make sure you intersperse the original code in your MIPS code so it is easy to follow. Please do not save or restore un-necessarily Hint: usernun must be on the stack in order to pass its address to InputDialogInt) int doit(char .prompt, int i, int . int k, char c) int temp, usernum temp xyz(i,j,k,c)i InputDialogInt (prompt, &usernum) tempmunge(temp, usernum) if (tenp0) return usernum else return temp: varlables registers ?a0 ?al $a2 ?a3 none $s0 home locations prompt temp usernum none
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
