
Originally Posted by
Jumper
Thanks for the answer and your idea works, it it any different if I use that way or:
for n=o to 255
HSERIN [RxData(n)]
next n
That'll work just as well. Wouldn't be the case with SERIN2, but with HSERIN it's fine.
I was trying to load a Byte from the RxData array into the lowbyte and high byte of a word array "C_Data(x)". What would be the best way of doing (since this is not allowed)?
Here's another possibility...
Code:
C_Data(i)=RxData(n) << 8 + RxData(n+1)
or...
Code:
RxData VAR BYTE[256]
RxDataW VAR WORD EXT
@RxDataW = RxData
; -- then later on ---
C_Data(i) = RxDataW(n/2)
But the second one assumes the data in the byte array is aligned to word boundaries, which may not be the case.
<br>
Bookmarks