I've tried

#config
__config1 _FOSC_HS & _WDTE_OFF & _PWRTE_ON & _MCLRE_OFF & _CP_OFF & _CPD_OFF & _BOREN_ON & _IESO_ON & _FCMEN_ON & _LVP_OFF & _WRT_OFF
#endconfig

at the top the basic program. I compile and load the hex file into MPLAB and program the chip using the PICSTART Plus. I leave the configuration bits "set in code" since I'm assuming that is what the above is supposed to take care of. Apparently it doesn't, rather the PIC reverts to the 4MHz internal oscillator. I also set the OSCCON to %01101000 which is supposed to use bits FOSC 0-2 to set the oscillator choice.

I also tried defining the config1 register to set it up to use the external crystal: DEFINE CONFIG1 $EFC2 Maybe defining is not the right approach and I need to do some sort of assembly code snippet.

I can select the 8MHz internal oscillator by setting OSCCON, so I don't know why it won't let me select an external crystal.