Introduction to Computer Architecture I/O and Arithmetic
For this project, you will write a MIPS assembly language program to calculate the function
𝑦 =
(𝑎 + 13)𝑥2 + 4𝑥
5
Your program should prompt the user to enter values for 𝑎 and 𝑥, compute the result and display the
result on the screen. Your program does not need to loop through the process; the example below shows
two executions of the program.
Your program should include appropriate comments indicating what the code should be doing and
what registers are being used for. After displaying the results, your program should exit cleanly. Your
programs should be turned in through HuskyCT before class starts on the due date. You should test your
programs using the SPIM simulator to ensure their functionality before submitting them.
Example output:
Enter a value for a: 17
Enter a value for x: 6
y=220 R4.
Enter a value for a: 6
Enter a value for x: 17
y=1111 R4.
Objectives:
1. To introduce the SPIM simulator for the MIPS assembly language.
2. To introduce and practice writing MIPS assembly language programs.