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

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 Functions:

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 a 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 characters in the string from the beginning to the end.
  3. The program will call the procedure vowelp to check if a character in the string is a vowel or not.
  4. Count how many vowels and how many non-vowels are in the string in the calling function.
  5. Print out the final results with appropriate message in the calling function.
  6. Hint: A loop is needed.

You will hand in the following:

  1. The source code in the file num-vowel.s
  2. The screenshot to show the screen right after you loaded the .s file.
  3. The screenshot of the console displaying the testing result for "Hello there!"


Copyright: Department of Computer Science, University of Regina.