Need help moving 2 1-byte variables into a Long
Steel
Posts: 313
This code is not working for me:
VAR
·· Long·· X_VALUE
·· Byte·· Buffer[noparse][[/noparse]2]
PUB
·· Buffer[noparse][[/noparse]0] := $FF
·· Buffer[noparse][[/noparse]1] := $FF
· X_VALUE[noparse][[/noparse]15..8] := Buffer[noparse][[/noparse]0]
· Y_VALUE[noparse][[/noparse]7..0] := Buffer[noparse][[/noparse]1]
...I thought that since DIRA and OUTA are pin addressable, that variables would be to := ?
How do you concantenate 2 byte variables into 1 long variable?
Thanks
Shaun
·
VAR
·· Long·· X_VALUE
·· Byte·· Buffer[noparse][[/noparse]2]
PUB
·· Buffer[noparse][[/noparse]0] := $FF
·· Buffer[noparse][[/noparse]1] := $FF
· X_VALUE[noparse][[/noparse]15..8] := Buffer[noparse][[/noparse]0]
· Y_VALUE[noparse][[/noparse]7..0] := Buffer[noparse][[/noparse]1]
...I thought that since DIRA and OUTA are pin addressable, that variables would be to := ?
How do you concantenate 2 byte variables into 1 long variable?
Thanks
Shaun
·
Comments
For a word it would be something along the lines of
Gr,
Mightor
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
| To know recursion, you must first know recursion.
The var is a long because I am using it in other places...but the same principle applies.
Thank you!
Be careful as the Prop is a little-endian machine..