Hi all, I think I am on the right path, teaching myself MIPS for my job and I need help adding to an array. I am doing a few different tutorials here and there and right now I am in the middle of doing a tutorial for this code:
value = 0;
for (index = 0; index < 100; index++)
data[index] = value++;
At the end of the program, my code should store 0-99 in memory. My code looks like this:
.data
array: .space 400
.text
.globl main
main:
la $s1, array
li $t1, 0
loop:
beq $t1, 100, end
addi $t1, $t1, 1
sw $t1, ($s1)
addi $s1, $s1, 4
j loop
Can someone help point me the way?