[FONT="Courier New"]Device = 16F628A
Dim Key As Bit ' Define a register for the Key data
' Start of program...
ALL_DIGITAL = TRUE ' Make all I/O's digital
Low PORTB.1 ' Set up the IDLE state of the RSIn_Pin
While 1 = 1 ' Create an infinate loop
RSIn Wait("Header"), Key ' Wait for the text "Header", then grab the key data
If Key = 1 Then ' Check if the key was pressed or not
Print At 1, 1, "Key is Pressed" ' If it was then display this text
Else
Print At 1, 1, "Released " ' Else if it wasn't then display this text
EndIf
Wend ' Loop for ever[/FONT]