How do I initialize this .space
to zeroes? I want every single bit to be 0
.
My code subroutine:
.data
.align 2
memspace: .space 256
.text
la $t7, memspace
move $t2, $zero
add $t2, $t2, 64 # should this be 256 / 4? confused
loop:
beq $t2, $zero, done
sw $t0, ($t7)
addi $t7, $t7, 4
addi $t2, $t2, -1
j loop
done:
jr $ra
I definitely am doing something wrong as when I use xspim
and look under my data segment I don't see the reserved space of 256
. I feel like my $t
registers don't do anything to the actual memory locations. I'm really confused right now. Should I be using stack pointers?