Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

using mips assembly on mars. we have to you the stack $sp, can someone help me I dont quite understand how to use the stack

using mips assembly on mars. we have to you the stack $sp, can someone help me I dont quite understand how to use the stack $sp

Create a program that will continuously take in numbers from the user until the user enters 0, and will then output all of the numbers that were entered, in order.

For example, the program output might look something like the following:

Please enter numbers, press (0) to exit:

393

21

5

120

456

3

22

0

Your numbers were:

393

21

5

120

456

3

Hints:

It might be a good idea to store the number of places $sp is from where it started so you know where to start and finish outputting numbers

You arent allowed to load a word using a register offset by another register; however, you can add those two registers together beforehand and then load the sum instead. For instance:

addu $t2, $t2, $sp # $t2 holds our offset

lw $a0, ($t2)

22

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

Advances In Databases And Information Systems 22nd European Conference Adbis 2018 Budapest Hungary September 2 5 2018 Proceedings Lncs 11019

Authors: Andras Benczur ,Bernhard Thalheim ,Tomas Horvath

1st Edition

3319983970, 978-3319983974

More Books

Students also viewed these Databases questions

Question

Design a job advertisement.

Answered: 1 week ago

Question

=+applying to all or most employers and employees?

Answered: 1 week ago

Question

=+associated with political parties and if so, which ones? Are

Answered: 1 week ago