Question: Using Mars Assembly language Write a MIPS program that has two procedures. (Implementation 60 points, refer to coding rubric for remaining 40 points) The first
Write a MIPS program that has two procedures. (Implementation 60 points, refer to coding rubric for remaining 40 points) The first procedure is tolower to convert a null terminated string to all lowercase. Do not convert characters that are already lowercase. Count the number characters that you convert to lowercase. Pass the memory location of the from string to convert in $a0. Pass the memory address of the string to copy the converted string into in Sa1. Return the number of characters that were translated in $vO. (20 points) The second procedure is toupper to convert a null terminated string to all uppercase. Do not convert characters that are already uppercase. Count the number characters that you convert to uppercase. Pass the memory location of the from string to convert in $a0. Pass the memory address of the string to copy the converted string into in $a1. Return the number of characters that were translated in vo. (20 points) In your mainline, .Ask the user for a string to convert to lowercase. Call the procedure to convert the string. Print the converted string and the number to characters translated. (10 points) Ask the user for a string to convert to uppercase. Call the procedure to convert the string. Print the converted string and the number to characters translated. (10 points) Example output: Enter a string to convert to lowercase: Hello World. I am 100 years old! The converted string is: hello world. i am 100 years old! The number of translations is: 3 Enter a string to convert to uppercase: Hello World. I am 100 years old! The converted string is: HELLO WORLD. I AM 100 YEARS OLD! The number of translations is: 18
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
