sorry, but stupiddum is right... unlike desktop computers, which typically deal with high-level languages for programming, separating you from the hardware, microcontroller programming is very closely related to the hardware, especially when you're writing in assembly. even when using higher-level compilers (C, BASIC, etc), because of the nature of a microcontroller, you're still dealing pretty directly with hardware.
and the hardware of a PIC 16F877 is going to be very different from any motorola device.
at best, you could port the code, but that would take a fair amount of knowledge of both programming languages, at which point it would probably be easier to write it from scratch, or find something similar that's already written for an '877.
if you can at least get a general idea of how the code for the motorola chip is actually functioning, you can use that as a general outline for how to structure your program on the PIC.
it will be well worth your while to learn how to code for PICs anyway; this might be a challenging project to start out with (whereas most people start with some simple "hello world" type programs, flashing some LED's, etc)
it's a good idea to learn how to program PICs in assembly language, even if you don't use it in the end, because it forces you to learn how the hardware is actually set up in the PIC; after you know that, it makes programming in high-level languages much easier.
Personally I program in C using the (free) CC5X compiler, program PICs using ICPROG with a JDM serial port programmer, and have recently started using the BLoader/Screamer bootloader setup detailed at sparkfun.com, as it makes working on a program a LOT easier on PICs such as the 16F877 (don't need to keep plugging/unplugging the in-circuit programming cable)