Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Modify your First MIPS Program ( or start from scratch ) to do the math shown below. Open a new file in MARS called SecondMIPSProgram.asm

Modify your First MIPS Program (or start from scratch) to do the math shown below.
Open a new file in MARS called SecondMIPSProgram.asm
Write a program that does the following math
x =(73)+(5+2)
Make sure you store the results in $t4.
Hint: You may need to use other registers besides $t0, $t1 and $t2. Maybe...
Once it runs, document it well and upload it to Canvas under the SecondMIPSProgram.asm. Please make sure to attach it as a .asm file.
Note: All values are hardcoded. And nothing is displayed on the screen. Just need to verify that the correct value ends up in $t4
# File Name: SecondMipsProgram.asm
# Name: You
# Date: Day written
# Description/Purpose: This program performs the following equation.
# x =(A - B)+(C + D)
# This is going to take three steps
# First, (A-B)
# Then (C+D)
# Then add the results.
.text
.globl main
main:
addi $t0, $zero, 7 # A - Load hard coded values (called immediate value) into $t0, $t1, $t2 and $t3
addi $t1, $zero, 3 #B
addi $t2, $zero, 5 #C
addi $t3, $zero, 2 #D
# Write your code here to do the math
# Make sure to exit cleanly
li $v0,10
syscall

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

Databases Illuminated

Authors: Catherine M. Ricardo

1st Edition

0763733148, 978-0763733148

More Books

Students also viewed these Databases questions

Question

=+How do the functions of HR vary with these various choices?

Answered: 1 week ago

Question

What are the stages of project management? Write it in items.

Answered: 1 week ago

Question

What is the difference between Needs and GAP Analyses?

Answered: 1 week ago

Question

What are ERP suites? Are HCMSs part of ERPs?

Answered: 1 week ago