MIPS problem

Hello forum,

I am a mips newbie and have a problem with a small mips program, that should read in 5 integers in a loop and save them in an array like so:

jal pread1 # read in integer
move $t2, $v0 # save it in t2

# TODO: save integers as array "elements"

addi $t0, $t0, 4 # increment loop counter by 4
blt $t0, 20, loop # If ($t0 < 20)


ar: .space 16 # 16 Byte for 4 integers[/color]

The problem is that I don't know how to increment the array element positions and save the t2 values there. I think I have to increment the array's base address somehow....
Hope that at least my approach is right.
Thanks in advance for any help.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!