I can't seem to visualize how this works. I'm trying to translate this simple assignment from C to mips:
#define ARRAYSIZE 16
int intarray[]={1, 5, -3, 6, 12, 21, 18, 44, 32, 9, 23, 10, 11, 99, 100, 24};
intarray[little] = intarray[ARRAYSIZE-1];
So I define the array in the data
.data
intarray: .word 1, 5, -3, 6, 12, 21, 18, 44, 32, 9, 23, 10, 11, 99, 100, 24
Now the problem is I know how to load a word from this array easy enough
lw $t0, intarray($a0)
But I can't figure out how to save to that array because it's not located in a register. Can I even manipulate that array, or do I have to build a duplicate array in the registers?