posting the hex might not get you any where, need the code. and just for an info the pic 16f877 has limted RAM for MMC access. So if you wanna access the memory card you can do one of the following
1. use a buffer (a 256 bit buffer {512 is a must for MMC}) for card access, and continue using the 16f877
2. use other uCs like 18f 4550 having more RAM.
Cheers!