CS201 Lab: Introduction to PCSpim

Objective of this lab:


	To investigate PCSpim and implement the SPIM Basic I/O

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.

Write a SPIM assembly language program Peter.s.
The program will do the following:

  1. Prompt the user to enter his/her name by "Hello, what is your name?"
  2. The user will enter "Peter".
  3. The program will prompt the user again by "How old are you?"
  4. The user will enter 20. (Note: this will be read as an integer)
  5. The program will print out

    Peter
    is 20 years old.

     
    (Note: this will have a newline character at the end to keep your output tidy.)

You will hand in the following:

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


Copyright: Department of Computer Science, University of Regina.