It should be no problem, the 12 bit core of the 12C509 has less instructions than the 14 bit core 16F84 - at a quick glance the only code change required is 'return', this isn't supported on the 12 bit chips - you need to replace it with 'retlw 0x00' instead.