Question: Consider the program: .data 10000 myArray: .word 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 .text 2000 la $s0, myArray li $s1, 0

Consider the program:

.data 10000

myArray: .word 1, 2, 3, 4, 5, 6, 7, 8, 9, 10

.text 2000

la $s0, myArray

li $s1, 0

loop: sll $t0, $s1, 2

add $t0, $t0, $s0

lw $s2, 0($t0)

lw $s3, 4($t0)

add $s2, $s2, $s3

sw $s2, 0($t0)

addi $s1, $s1, 1

slti $t1, $s1, 9

bne $t1, $zero, loop

.end

Explain what does this program do? How is the data bound from the .data segment to the base address register $s0? What values will the two labels myArray and loop will have in the symbol table? Explain

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!