Question

1. Assume that variables f,g,h,ij are assigned to registers Ss0 to Ss4 (in the given order). Assume that the base addresses o
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Please find the code below::::

add $t0,$zero,$s0 #load 0 to t0
addi $t0,$t0,400 #add 400 to t0
A : lw $s7,0($t0) #load value from array A
addi $s7,$s7,1 #increase value by one
sw $s7,0($t1) #store value to array B
subi $t0,$t0,4 #subtract index by 4
bne $t1,$s0,A #loop until t1 is greater than zero

Conclusion::

Given code traverse array A in reverse order and increase it's value by one and assigns this value to another array B.

Add a comment
Know the answer?
Add Answer to:
1. Assume that variables f,g,h,ij are assigned to registers Ss0 to Ss4 (in the given order). Assume that the base addresses of arrays A and B are in $s6 and Ss7. Registers St0 to St2 are used to...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT