This should be a relatively simple program for you to write. The intent of this program is to get you familiar with writing MIPS programs and the MARS IDE. For this program I want you to build on the knowledge you learned from the MIPS tutorials, specifically Tutorials 8 and 9. I would like you to write a program that implements the following C instruction in MIPS:
f = g + (h - 5);
You can get as creative as you want but minimally you need to:
- Declare the variables f, g and h and set them to the appropriate values.
- Implement the math in MIPS.
- Final result should be stored if the variable f.
- Add comments to your program as you feel necessary. Make sure one of the comments includes your name.
When done please submit the .asm file that you created in MARS to this link. Please take the time to learn MARS, try debugging such as single stepping, monitor the registers, determine how to start and stop a program, review the online help, etc.. Spending this time now will help you during Week 5 where you will create a more complex program.
||Computer Organization and Design
||David A. Patterson; John L. Hennessy
|Due By (Pacific Time)
||01/27/2016 10:00 pm