Answered step by step
Verified Expert Solution
Question
1 Approved Answer
The purpose of the program is to read in a list of 10 integers and then print them out. There are 4 functions in the
The purpose of the program is to read in a list of 10 integers and then print them out. There are 4 functions in the program: 2 of which you are to complete. INSTRUCTIONS. Main: This function will call getdata and print. Main is complete and should not be changed. Getdata: This function reads 10 integers and stores them into memory. There is one parameter ($a0) which holds the address of where the list of numbers is to be stored. Getdata calls the function printstr to print the prompt. Getdata is complete and should not be changed. Printstr: This function is to print a string. There is one parameter (Sa0) which holds the address of the string to print. You are to complete this function so it performs as required. This function is call from the getdata function and lire print function. Print: This function is to print the list of integers. The integers must all be on the same line of output and be separated by a comma and space (already in the data segment). Sec the example input and output below. This function must call the printstr function to print the comma string. Remember that as this function calls another, it must save and restore the $ra. Specifics: Use only the instructions covered to date. Do not use pseudo-instructions. Sec the information under MARS for preventing the use of pseudo-instructions. Make sure that your print function calls the printstr function correctly and that the stack is used correctly
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started