Question: Project Description You will learn to code procedures and follow the MIPS register conventions for this project. There will be three procedures/functions in your code:

Project Description You will learn to code procedures and follow the MIPS register conventions for this project. There will be three procedures/functions in your code: the main() procedure, the revCase() procedure and the findMin() function. Each must have the defined parameters and functionality as explained in these specifications. You are given a starter file revCaseMin.asm to add your code to; some of the system calls for output and input are already done. Write an assembly program revCaseMin.asm where:

1. The main() procedure a. prompts the user to enter 30 characters and stores these characters as a character array into memory b. invokes the revCase() procedure that accepts as an argument the base address of this character array and the number of characters in this array

2. The revCase() procedure a. Has two parameters, the base address of a character array and the number of characters in this array. You may not hard code the argument value 30 within this procedure but instead use the 2nd parameter of the procedure. Recall registers $a0 and $a1 will be populated by the calling procedure main(). b. Calculates the reverse case of the characters entered by the user placing them in a character array and prints the characters in reverse case using a loop. c. Invokes the function findMin() passing in the required arguments and uses the return value from findMin(). The return value from findMin() is the minimum character entered by the user after the character string is reversed in case. See details that follow for findMin(). d. Prints the minimum character returned from the function findMin()

3. The findMin() function has two parameters: the first parameter is the base address of the character array it will examine and the second is the number of characters that it will examine to find the minimum ASCII character. findMin() returns in $v0 the minimum ASCII character from the string it examined. You may not hard code the value 30 but must instead use the value in the first argument register $a1 to aid in the looping structure for finding the minimum character.

4. All register conventions and procedure invocation conventions must be adhered--review the MIPS reference sheet for preserving registers across procedure calls and these conventions.

5. Use the starter code file, revCaseMin.asm, making the necessary modifications for this project. Remember, to place YOUR name at the top of the code.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!