[A89] arrays question
[Prev][Next][Index][Thread]
[A89] arrays question
Ok, I'm now a forced user of GNU as, so a few questions:
is it ok to define a 5-word array like this:
MyArray:
.word 5
... and this is the way I'm accesing the items in the "array":
lea MyArray,%a4
addi #1,0(%a4) | for item 0
addi #1,6(%a4) | for item 3
...
move.w 0(%a3),-(%sp)
move.w 2(%a3),-(%sp)
and more like that... is this ok?
onther question, if the above is ok, I assume the data is not zeroed, so I should clear it before working with it, right?, something like this:
clr.l (%a4)
clr.l 4(%a4)
clr.w 8(%a4)
should clear the 5 words, right?...
tia,
ra.-
Follow-Ups: