[editor]

Device = 18F25K20
Declare Xtal = 64

Declare Hserial_Baud = 9600
Declare Hserout_Pin = PORTC.6
Declare Hserin_Pin = PORTC.7

Dim Bytein As Byte
Dim MessageBufferIndex As Byte
Dim MessageBufferPos As Byte

Do
ReceiveLine:
Clear MessageBufferIndex
Bytein = HRSIn
If Bytein <> ":" Then GoTo ReceiveLine
HRSIn Hex2 MessageBufferPos

HRSOutLn "\rReceived: ", IHex2 MessageBufferPos
Loop

[/editor]