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

Program#1:

Write a SPIM assembly language program convertF2C.s.
The program will do the following:
  1. Prompt the user to enter a temperature in Fahrenheit
  2. Convert it to Celsius
  3. Print out the converted values of the input 100, 0, and 50 with appropriate message

Program#2:

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
  3. Print out the calculated results of the input 7, 5, and 9 with appropriate message

You will hand in the following:

  1. The source code in the file convertF2C.s and equation.s
  2. The print out of the screen shot (print screen) to show the program has been successfully loaded
  3. The print out of the screen shot of the console displaying the results


Copyright: Department of Computer Science, University of Regina.