Is there a way to simply copy the hight byte of a short in a byte and the low byte o a short into an another byte.
short = 0xff04
---> hbyte = 0xff
---> lbyte = 0x04
Dim s As Short = 0xff04
Dim l As Byte = Bit.And(0x00ff, s)
Dim h As Byte = Bit.ShiftRight(s, 8)
'if you want unsigned values:
Dim ul As Int = Bit.And(0x00ff, s)
Dim uh As Int = Bit.And(0x00ff, Bit.ShiftRight(s, 8))
Log(ul)
Log(uh)