Question: Consider a list (aka an array) A of 10 elements defined as followed: A = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100]
Consider a list (aka an array) A of 10 elements defined as followed:
A = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100]
The MIPS assembly code below loads the contents of the list A into memory starting at the address stored in register $s0.
The initial values in register $s0 is 100.
Assemble and run the program. Take a screenshot of your text segment and data segment, showing the array elements above in memory. What is the address of the last element of the array?
addi $s0, $zero, 100
addi $t5, $s0, 40
TOP: addi $s5, $s5, 10
sw $s5, 0($s0)
addi $s0, $s0, 4
bne $s0, $t5, TOP
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
