Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

**MIPS PROGRAM LAB** In this lab you will have an array of ints. You will copy the positive ints into one array and the negative

**MIPS PROGRAM LAB**

In this lab you will have an array of ints. You will copy the positive ints into one array and the negative ints into another array.

Create three arrays of ints in your data segment. The input array, an array for the negative ints, and an array for the positive ints. Make each array large enough to hold 25 ints.

  1. Prompt the user to enter positive and negative ints and to enter 0 when finished.
  2. Read the user input into your input array. Keep track of the number of ints entered. You can assume that the user will not enter more than 25 numbers.
  3. Copy all positive values in the input array into the array of positives.
  4. Copy all negative values in the input array into the array of negatives.
  5. Print a heading and then print the array of positives, printing a newline between each array element. Only print the array elements that that contain positive numbers from the input.
  6. Print a heading and then print the array of negatives, printing a newline between each array element. Only print the array elements that that contain negative numbers from the input.

Do not use array names in your code. You may use string names in la instructions.

Make sure your program includes comments. You need comments at the top with your name and lab number, and comments for every line of executable code (one comment is sufficient for all statements required for a syscall). Include an explanation of how each register is used.

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

Current Trends In Database Technology Edbt 2006 Edbt 2006 Workshops Phd Datax Iidb Iiha Icsnw Qlqp Pim Parma And Reactivity On The Web Munich Germany March 2006 Revised Selected Papers Lncs 4254

Authors: Torsten Grust ,Hagen Hopfner ,Arantza Illarramendi ,Stefan Jablonski ,Marco Mesiti ,Sascha Muller ,Paula-Lavinia Patranjan ,Kai-Uwe Sattler ,Myra Spiliopoulou ,Jef Wijsen

2006th Edition

3540467882, 978-3540467885

More Books

Students also viewed these Databases questions

Question

What would be the depreciation expense and interest expense

Answered: 1 week ago

Question

Question What is a Roth 403 (b) plan?

Answered: 1 week ago