CS201 Lab: Arithmetic Operations and Debugging

Objective of this lab:


	To investigate Arithmetic Operations and implement them in PCSpim. 

Preparation


	Read lab lecture notes.

Lab Assignment

Please note:
To make it easier for marking, you are required to submit one .pdf file and all the .s files.
The .pdf file will contain all the required components for the lab assignment.
This will apply to Lab #7 to Lab #10.

Program Equation:

Write a SPIM assembly language program equation.s based on the example program math1.s in the lab notes.
The program will do the following:
  1. Prompt the user to enter a value for X
  2. Calculate the result of A*X^2+B*X+C
  3. Print out the calculated results of the input value 7, 5, and 9 with appropriate message

You will hand in the following:

  1. The source code in the file equation.s
  2. The screenshot to show the screen right after you loaded the .s file.
  3. The screenshot of the console displaying the results


Copyright: Department of Computer Science, University of Regina.