So I'm trying to put 10 numbers that are between 0-50 into an array.
li $t0, 0 #loopcounter = 0
la $a0, array
addi $a0, $0, 0 #initialize array index = 0
loop:
li $v0, 5
syscall
blt $v0, 0, loop
bgt $v0, 50, loop
add $t0, $t0, 1 #increment loop counter
sw $a0, 0($a0) # ERROR HERE #store value of $v0 at index 0
addi $a0, $a0, 4 # Increment the index by 4
blt $t0, 10, loop
How would I go about putting those 10 numbers into my array at $a0 and then be able to access them later?
SWinstruction.