Can you find a P16F877a.inc file here: C:\Program Files\Microchip\MPASM Suite

And under MCS compile and program options is your mpasm path pointed to it?