代写 MIPS computer architecture Computer Architecture Spring 2019

Computer Architecture Spring 2019
Homework No. 3 (Due on April 15)
(When you run the SPIM simulator, you need to capture the window showing the simulation result and submit it.)
1. Text Exercise 2.1. (15)
2. Text Exercise 2.3. (15)
3. For the code in the lecture note p. 48 on non-leaf procedure, assume that n = 3, sp = 500, the first line of the procedure ‘fact’ is at memory 300, and the MIPS code is loaded at memory 200 (the address of ‘addi $sp $sp −8). Run the code by hand, and show the result of every instruction line by line. After that, run the code using SPIM, and verify if your hand computation is correct. Show how many steps are required to run the code, and the window showing correct answer. (40)
4. For the code in the lecture note p. 54 on string copy, assume that address of x and y are 100 and 200, respectively. i = 10 and sp = 500. Run the code using SPIM, and show the window showing correct answer. (30)
SungKyunKwan University 1 Hee Yong Youn