Given that the hardware resources are different, if the code uses hardware resources the whole solution may not be applicable even if it were changed to equivalent instructions. For example if the code needs 2 timers with arbitrary periods, PIC can only write an arbitrary period for TMR2, so you'd have to rethink the solution.