View the step-by-step solution to:

Read an integer, say x, from the spim console window by printing the message "enter an integer." You do not need to write this part, it is already...

Read an integer, say x, from the spim console window by printing the message "enter an integer." You do not need to write this part, it is already given to you as part of the homework. The integer is moved to $s0 in the register file.

My question is:
1.Store x in memory location 0x10000020.
2. Multiply x by 8 and store it to the next integer memory location, loc1.
3 Subtract 1 from result of #2 and put the result in $t0.

#this is part of code
.text
.globl __start
__start:
la $a0, msg1
li $v0, 4
syscall

#read integer into $s0
li $v0, 5
syscall
#value read from keyboard returned in register $v0.

add $s0, $zero, $v0 #move $vo to $s0

#########################################################
#Do not touch anything above this line. Write program below.#
#########################################################







####################################
#Do not touch anything below this line.#
####################################

la $a0, msg2
li $v0, 4
syscall
li $v0, 1
= $t0
syscall

# Start of the data segement.

msg1: .asciiz "Enter an integer: "
msg2: .asciiz "The computed result is (hw2_sol): "
#end of hw2_sol.asm
Sign up to view the entire interaction

Top Answer

We need you to clarify your question for our tutors! Clarification request: Dear Student, I have reviewed your assignment... View the full answer

Sign up to view the full answer

Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.

-

Educational Resources
  • -

    Study Documents

    Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

    Browse Documents
  • -

    Question & Answers

    Get one-on-one homework help from our expert tutors—available online 24/7. Ask your own questions or browse existing Q&A threads. Satisfaction guaranteed!

    Ask a Question
Ask a homework question - tutors are online