Loop1 bsf RCSTA,CREN ;start continuous recieve
Loop call GetByte
xorlw 'O'
btfss STATUS,Z
goto Loop
call GetByte
xorlw 'N'
btfss STATUS,Z
goto Loop
;*****Experiment***********************************
btfss PIR1,RCIF ;check for anyother letters
goto Display
bcf PIR1,RCIF
bcf RCSTA,CREN ;stop continuous recieve
goto Loop1
;***************************************************
Display movlw 'C'
call PutByte
goto Loop
GetByte btfss PIR1,RCIF
goto GetByte
bcf PIR1,RCIF
movfw RCREG
return
PutByte btfss PIR1,TXIF
goto PutByte
movwf TXREG
return