adding external eeprom to pic16f877
1. If your "memory" mean RAM then I think that 16f877 doen't support external ram or rom,AFAIK.
2. If you just want extra data storage then you can connect up to 8 i2c EEPROMS to the i2c port.
3. The only way I can think of is to optimize your code. If you're using C compiler then you might have to play around with how you used variable. Also try to turn on optimize option. If you don't need to use a lot of memory all at once then you might be able to swap it to internal/external EEPROM.
If you REALLY need extra ram and cost doesn't matter then I'd suggest you to look at 18F series. 18F458 come with 768bytes ram and doesn't cost much more than 16F877 here. From data sheet, it's almost pin to pin compatible with 16f877. However you will need new tools to work with it.