1. The 877A has multiple Ground and Power pins, make sure you have them all connected.

2. You did remember to do something meaningful with the MCLR pin?

3. Whilst you have defined OSC 20 for your program, you need to set HS OSC in the PIC Configuration Fuses. Whilst your program compiles wihout error, it didn't do much for the CONFIG Fuse settings for my programmer which remained at XT OSC.

4. I don't recall what the default Brown-Out is for that PIC (again my programmer reported it ENABLED by Default)... you might need to turn it OFF to run at 4.3v.