Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Pro SQL Server Administration

Authors: Peter Carter

1st Edition

1484207106, 9781484207109

More Books

Students also viewed these Databases questions