I see examples of using this to turn off analogue comparator but it gives an undefined symbol error for me.

CMCON = 7

I also included the following lines I found elsewhere and got error 'opcode expected instead of '___config'

@ __config _INTRC_OSC_NOCLKOUT & _WDT_ON & _PWRTE_ON & _MCLRE_OFF & _LVP_OFF & _BODEN_ON
' Internal Oscillator
' Enable watch dog timer
' Enable power up timer
' Disable MCLR pin
' Disable low voltage programming
' Enable brown out detect

Thanks all

Rich