Propellers' highbyte and lowbyte
HumanOzz
Posts: 13
Hey guys,
i need some help with this,
well, i would like to know whether its possible to access each byte of a word.
for eg, defined blabla as word
then, i would like to know if its possible to access each byte in the propeller?
like in bs2, i can just use blabla.highbyte and blabla.lowbyte to access the bytes.
Basically what i want is to write or read the high and low byte of a word.
Is there really a command in propeller which does this?
i need some help with this,
well, i would like to know whether its possible to access each byte of a word.
for eg, defined blabla as word
then, i would like to know if its possible to access each byte in the propeller?
like in bs2, i can just use blabla.highbyte and blabla.lowbyte to access the bytes.
Basically what i want is to write or read the high and low byte of a word.
Is there really a command in propeller which does this?
Comments
because i was thinking of combining two bytes into 1 word, 1 of the byte will become the highbyte and the other will be the lowbyte of the word..
so, if i initially set the two bytes to 16-bit size, shift the 1st byte (which will become the highbyte) by 8, den OR them together..
I should be getting the one 1 want right.
(will test later)
It works the same way to access individual bytes of a WORD variable or individual words of a LONG variable.
I assume it works for longs but didn't check
John Abshier