Answered step by step
Verified Expert Solution
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
Make sure you store the results in $t
Hint: You may need to use other registers besides $t $t and $t 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 $t
# File Name: SecondMipsProgram.asm
# Name: You
# Date: Day written
# DescriptionPurpose: This program performs the following equation.
# x A BC D
# This is going to take three steps
# First, AB
# Then CD
# Then add the results.
text
globl main
main:
addi $t $zero, # A Load hard coded values called immediate value into $t $t $t and $t
addi $t $zero, #B
addi $t $zero, #C
addi $t $zero, #D
# Write your code here to do the math
# Make sure to exit cleanly
li $v
syscall
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started