Thanks for this. I'm using pbp3 so I copied and pasted and it compiled. The program still doesn't seem to time correctly tho, which I describe below.
-- How did you know this was the correct configuration? I've read many threads, tried many different suggestions including some that use @ DEVICE. I've looked in the manual and went by its examples. The manual comes close but it has a couple spaces before the CONFIG, which it shows in caps and yours is lowercase. This is what I get when I type it in:

#CONFIG
__config _CONFIG1, _HS_OSC & _WDT_OFF & _PWRTE_ON & _MCLRE_OFF & _CP_OFF & _CPD_OFF & _BOR_ON & _IESO_ON & _FCMEN_ON & _LVP_OFF & _DEBUG_OFF
__config _CONFIG2, _BOR40V & _WRT_OFF
#endconfig

Note that CONFIG is uppercase and endconfig is lowercase, tho when I cut and pasted the code they were both uppercase. Go figure.

How did you know your code would work? Trial and error? Is there a book you can recommend? I spent hours and hours getting nowhere.

----------------------------------

To test the timing I toggle a bit and look at it with a scope. This is the code:
portb.7 = 0
PAUSEUS 100
portb.7 = 1
PAUSEUS 100
portb.7 = 0
pauseus 100
portb.7 = 1
PAUSEUS 100
portb.7 = 0
pauseus 100
portb.7 = 1
pauseus 100
portb.7 = 0

I have OSCCON set to select the external crystal and define the oscillator as 20:
OSCCON = %01111110 'runs at 20 MHz set in configuration bits

define OSC 20

(again the word define is lowercase in pbp but copies and pastes as uppercase, tho I show it ias it appears on pbp)

I expect
portb.7 to toggle at 100usec high, 100usec low. Instead it is 250usec hi/lo. It's as if the pic is running at 8MHz but doing the timing calculations at 20MHz.

What am I missing?