High likely you run out of codespace OR you're using some unavailable feature of this PIC in a ASM routine... hard to tell without the code.