PDA

View Full Version : lowbyte/highbyte -> word



brodin
- 2nd October 2003, 15:49
if i use the highbyte and lowbyte like this:

a VAR BYTE
b VAR BYTE
c VAR WORD
d VAR WORD

c = 15334

a = c.lowbyte
b = c.highbyte

d = ?


Then i want to get the word back from A and B into D.
How do i do that?

Melanie
- 3rd October 2003, 13:58
I would have thought half the folks reading this thread would have replied... just reverse what you've already done... using your example...

d.lowbyte=a
d.highbyte=b

Using your example d would now equal 15334.

Melanie

brodin
- 3rd October 2003, 14:01
Thanks for the answer!

RodSTAR
- 26th August 2007, 02:41
thxs Melanie it was usefull to me