Jump to content

Mips Assembly arrays

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
1 reply to this topic

#1
Guest_Llamanade_*

Guest_Llamanade_*
  • Guests
I need to be able to read through an array in mips assembly. the array looks like so.

array:	   .word [Some Hex value]

	     .word [Some Hex value]

             .word [Some Hex value]

             .word [Some Hex value]

             .word [Some Hex value]

             .word [Some Hex value]

             .word [Some Hex value]

i need to load these values into a register so I can then do arithmetic with them. I need to take the sum of all values. I think I can handle the rest, its just I cant find any info on iterating through the array to get al the values.

#2
kromagnon

kromagnon

    Learning Programmer

  • Members
  • PipPipPip
  • 50 posts
You have to add multiples of 8 to the address of the beginning of the array to traverse to the next elements.
<!-- comment comment comment --></