Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This assignment is designed to introduce you to the MIPS assembly language and the MIPS simulator. It is recommended that you use the MARS simulator

image text in transcribed

This assignment is designed to introduce you to the MIPS assembly language and the MIPS simulator. It is recommended that you use the MARS simulator but you are not required to do this. For this assignment, you are restricted to the following instructions plus the appropriate syscalls. Do not use extended (pseudo) instructions or any other instructions such as li. add sub addi a. Open the text editor and type in the following. Then save your work as assign2.asm". .data .globl main .text main: c. Add the MIPS assembly language instructions (after main:) to complete the following steps. Do not skip steps. The $s registers must have the correct values at the end. Use other registers as needed. Actions: 1. Initialize $s0 to 15 2. Initialize $1 to -4 3. Read (input) an integer and place the answer into $s2 4. Set $s3 to $s 1 - $50 + $s2 5. Set $s4 to $s3 + $s2 - 7 6. Set $85 to 20 + $S1 -$s2 7. Exchange or swap the values in $80 and $81 8. Set $s2 to -$s2 9. Print the values for $80, $81, $s2, $s3, $s4 and $85 (they will appear on the same line of output) 10. End the program cleanly This assignment is designed to introduce you to the MIPS assembly language and the MIPS simulator. It is recommended that you use the MARS simulator but you are not required to do this. For this assignment, you are restricted to the following instructions plus the appropriate syscalls. Do not use extended (pseudo) instructions or any other instructions such as li. add sub addi a. Open the text editor and type in the following. Then save your work as assign2.asm". .data .globl main .text main: c. Add the MIPS assembly language instructions (after main:) to complete the following steps. Do not skip steps. The $s registers must have the correct values at the end. Use other registers as needed. Actions: 1. Initialize $s0 to 15 2. Initialize $1 to -4 3. Read (input) an integer and place the answer into $s2 4. Set $s3 to $s 1 - $50 + $s2 5. Set $s4 to $s3 + $s2 - 7 6. Set $85 to 20 + $S1 -$s2 7. Exchange or swap the values in $80 and $81 8. Set $s2 to -$s2 9. Print the values for $80, $81, $s2, $s3, $s4 and $85 (they will appear on the same line of output) 10. End the program cleanly

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

Database Design Application Development And Administration

Authors: Mannino Michael

5th Edition

0983332401, 978-0983332404

More Books

Students also viewed these Databases questions

Question

3. How is money associated with subjective well-being?

Answered: 1 week ago

Question

I receive useful feedback about my performance.

Answered: 1 week ago

Question

I am encouraged to offer opinions/suggestions.

Answered: 1 week ago