I am trying to store the numbers 0 to 10 sequentially in memory using mips32. Here is my code:
addi $s2, $zero, 10
addi $s1, $zero, 0
addi $t0, $zero, 0
addi $s6, $zero, 10
L1:
beq $s1, $s2, exit
sll $t0, $s1, 2 #multiply by the size of a word to get the cur address of $s6
sw $t0, 0($s6)
addi $s1, $s1, 1
j L1
exit:
I got an error with sw $t0, 0($s6) What is wrong with storing this at the beginning of memory?