Just a bit more info here is the inc file i am using, in answer to JOE s question the the device on the other side is my PC running hyper terminal

NOLIST
ifdef PM_USED
LIST
include 'M16F87x.INC' ; PM header
device pic16F877, hs_osc, wdt_on, pwrt_on, lvp_off, protect_off
XALL
NOLIST
else
LIST
LIST p = 16F877, r = dec, w = -302
INCLUDE "P16F877.INC" ; MPASM Header
__config _HS_OSC & _WDT_ON & _PWRTE_ON & _LVP_OFF & _CP_OFF
NOLIST
endif
LIST