If you can program the 877 with your device programmer, and your code runs as expected, I doubt your controller is bad.

Are you using DEFINE LOADER_USED 1?

Are you using DEFINE OSC ? & a crystal frequency that matches the loader firmware you program into the target?

Have you checked/verified the comm port the loader software is set to use?

Do you have the MCS loader software set for Auto Detect under Options >> Baud Rate?