Array of alliases in spin posible?
Rick_H
Posts: 116
I have 4 cogs of assembly that all read and write to the hub memory, in the hub thier organized by thier usage from the ASM code but in spin I would like to loop through sets of the variables to pass in groups.
just as an example
in the spin module their declared in I would like to be able to to write to the first element of each array in an indexed loop. so I would have 6 arrays containing 1 element each from the arrays ect.
is this possible? or is their an easier way to do this? keep in mind their not completely organized in this way their are vars randomly in between them for other purposes, I know I could just do loops with steps with this var grouping.
just as an example
var word array1[8], array2[8], array3[6], array4[6], array7[6], array8[8]
in the spin module their declared in I would like to be able to to write to the first element of each array in an indexed loop. so I would have 6 arrays containing 1 element each from the arrays ect.
is this possible? or is their an easier way to do this? keep in mind their not completely organized in this way their are vars randomly in between them for other purposes, I know I could just do loops with steps with this var grouping.
Comments
Here's what I'm thinking.
The address with be off (I think by 10). You can correct for this.
The to write a 5 to the first element of each array.
I think that's the way it would work.
I'm not sure I understood what you were asking so sorry if I'm way off base.
Hopefully someone here will have a better way of doing this (they usually do).
Duane
Andy