CS201 Lab: Procedure Calls

Objective of this lab:


	In this lab assignment, you are going to practice  
	implementing procedure calls in SPIM. 

Preparation


	Read lab lecture notes.

Lab Assignment

Program:

Write a SPIM assembly language program num-vowel.s to find out the number of vowels and the number of non-vowels in a given string and use procedure call to check if a letter is vowel or not. (Hint: The example program Is-vowel.s in the lab notes is very helpful.)
The program will do the following:
  1. Prompt the user to enter a string.
  2. Read letters in the string from the beginning to the end.
  3. The program will call the procedure vowelp to check if a character entered in the string is a vowel or not.
  4. Count how many vowels and how many other characters are in the string.
  5. Print out the calculated results with appropriate message.
  6. Hint: A loop is needed.

You will hand in the following:

  1. The source code in the file num-vowel.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 testing result
    for "I am going to run this program with the real hardware in two weeks."


Copyright: Department of Computer Science, University of Regina.