Question: Inspect the following program sample1.s , execute it on your virtual machine and answer the following questions What does line 17 to 19 do? (Use
Inspect the following program sample1.s, execute it on your virtual machine and answer the following questions
- What does line 17 to 19 do? (Use Appendix A of the Patterson reference or Application Help in QTSpim to find meaning of the commands).
- On line 18, why is register $a0 used? Are there other registers that could be used or not? If so, which ones?
- Modify the given assembly program so that it computes a value
- Create a copy of sample1.s
- Modify it so that it computes a rectangle's perimeter as defined by the following formula ..... 2w + 2l, where w = 10 and l = 15. The program should print "your name: student number": w = 5, l = 10, perimeter = 50. The program must calculate the perimeter using the formula.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
