Question: 1 ) In the second part, we see the instructions to read from input x and y , which are integers. . data x: .

1) In the second part, we see the instructions to read from input x and y, which are integers.
.data
x: .word 0
y: .word 0
.text
main:
li $v0,5 # Read x
syscall
la $t0, x
sw $v0,0($t0)
li $v0,5 # Read y
syscall
la $t0, y
sw $v0,0($t0)
a. What are the instructions required to read x from input? Explain what happens in each instruction.
b. In which register is the value of x stored?
c. The instructions above read x and y as integers. What change(s) must you make to read x and y as strings.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!