With the 16F87x series PIC's, writing to Flash Memory (program space) is just as easy as writing to EEPROM. Only difference is the locations are 14-bits instead of 8.

Then you have several K of space, depending on how big your program is.

Look at the READCODE and WRITECODE statements.

If it's actually a 16F877A it's more difficult, but still doable.
<br>