Shop OBEX P1 Docs P2 Docs Learn Events
Concatenating two bytes together to into a word. — Parallax Forums

Concatenating two bytes together to into a word.

Kevin HarrisKevin Harris Posts: 15
edited 2007-02-02 01:31 in BASIC Stamp
Is there an elegant way to take two byte variables and concatenate them into a word. For instance, I have something like...

CMD VAR Word
ByteOne VAR Byte
ByteTwo VAR Byte

ByteOne = $A1
ByteTwo = $03

Then I want CMD to = $A103. How do I go about doing that in PBasic?

Comments

Sign In or Register to comment.