Hola veguepic!
Mira esto a ver que te parece.
Antes de meternos con las interrupciones nos grabamos en unas variables temporales los registros W,STATUS y PCLATH.
Despues ponemos nuestro código de interrupción y acto seguido recuperamos y el valor que tenían W,STATUS y PCLATH para que... cuando volvamos al programa principal, estos registros sigan siendo los mismos que justo antes de llamar a la interrupción.
Codigo:
-------- 16F84A --------
list p=16F84A ; list directive to define processor
#include <p16F84A.inc> ; processor specific variable definitions
w_temp EQU 0x0C ; variable used for context saving
status_temp EQU 0x0D ; variable used for context saving
pclath_temp EQU 0x0E
ORG 0x004 ; interrupt vector location
movwf w_temp ; save off current W register contents
movf STATUS,w ; move status register into W register
movwf status_temp ; save off contents of STATUS register
movf PCLATH,w ;save PCLATH
movwf pclath_temp
; isr code can go here or be located as a call subroutine elsewhere
movf pclath_temp,w ;restore PCLATH
movwf PCLATH
movf status_temp,w ; retrieve copy of STATUS register
movwf STATUS ; restore pre-isr STATUS register contents
swapf w_temp,f
swapf w_temp,w ; restore pre-isr W register contents
retfie ; return from interrupt
Suerte!!
Un saludo desde Alicante.