;
;      irq_ktp.txt -  
;                       
;  IRQ init section:
;
RESET_VECTOR    CODE   0x0000     ; processor reset vector
        goto    START             ; go to beginning of program
;
;---------------------------------------------------------------
INT_VECTOR    CODE    0x0004      ; interrupt vector location

INTERRUPT
; pusher
        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 FSR,w
        movwf gtmp_fsr
        bcf STATUS,RP0
        bcf STATUS,RP1 ; sel RB0
        bsf TMR1H,7
        bcf PIR1,TMR1IF
      goto proc_tmms
      
; isr code can go here or be located as a call subroutine elsewhere
popper
        movf gtmp_fsr,w
        movwf FSR
        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
;