Question: Please write as MIPS assembly. Will be ran in the MARS simulator Objective The main goal of this assignment is to become familiar with the

 Please write as MIPS assembly. Will be ran in the MARS

Please write as MIPS assembly. Will be ran in the MARS simulator

Objective The main goal of this assignment is to become familiar with the instruction set architecture of MIPS. Objective In this assignment you are expected to use system calls (described in Appendix A and the previous lab assignment) and to understand the mechanisms behind the nested procedure calls in assembly language. The specific goal of this laboratory is to write a main program that: 1. Calls a procedure that: - Prompts the user to enter the size of the array (N) Prompts the user to enter N integers (1 word each) representing the elements of the array Stores the array starting from the address Ox10010400 Calls another procedure that: - Performs an in-place inversion of the array - the first element of the array becomes the last one, the last one becomes the first one, etc (swap elements 1 and N, 2 and N-1, etc). In-place means that the array will still start at the address Ox10010400 Calculates the integer average of all elements in the array O Since there is no integer divide, you will have to write your own. Simply count how many times you can subtract array size from the sum of its elements. - Displays the average - Returns - Returns to the main program which... 2. Displays: - A line of text that looks something like This is the new array..." AND - The new (inverted) array. 3. Exits Objective The main goal of this assignment is to become familiar with the instruction set architecture of MIPS. Objective In this assignment you are expected to use system calls (described in Appendix A and the previous lab assignment) and to understand the mechanisms behind the nested procedure calls in assembly language. The specific goal of this laboratory is to write a main program that: 1. Calls a procedure that: - Prompts the user to enter the size of the array (N) Prompts the user to enter N integers (1 word each) representing the elements of the array Stores the array starting from the address Ox10010400 Calls another procedure that: - Performs an in-place inversion of the array - the first element of the array becomes the last one, the last one becomes the first one, etc (swap elements 1 and N, 2 and N-1, etc). In-place means that the array will still start at the address Ox10010400 Calculates the integer average of all elements in the array O Since there is no integer divide, you will have to write your own. Simply count how many times you can subtract array size from the sum of its elements. - Displays the average - Returns - Returns to the main program which... 2. Displays: - A line of text that looks something like This is the new array..." AND - The new (inverted) array. 3. Exits

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!