high/low bytes of an array - how to access...
pacman
Posts: 327
I searched and read, but I'm still no clser to knowing the answer - I'm sure someone out their alrady knows the answer..
I have an array defined globally
word R30000[5]
From a subroutine - I want to access the high byte (and low byte) of each word in the array.
Low byte is easy - byte[R30000][0]
My reading suggestes that for the high byte I could use byte[r30000][1] {propellor manual 1.2 page 55{ish}}
But wouldn't byte[R30000][1], actually be the low byte of the 2nd word?
As a workaround - should I copy R30000[0] into a local variable and then use the byte[x], byte [x+1] method, or am I missing a greater truth?
I have an array defined globally
word R30000[5]
From a subroutine - I want to access the high byte (and low byte) of each word in the array.
Low byte is easy - byte[R30000][0]
My reading suggestes that for the high byte I could use byte[r30000][1] {propellor manual 1.2 page 55{ish}}
But wouldn't byte[R30000][1], actually be the low byte of the 2nd word?
As a workaround - should I copy R30000[0] into a local variable and then use the byte[x], byte [x+1] method, or am I missing a greater truth?
Comments
Or other beverage - {perhaps you dont drink?}
Thanks