ORG 0x000 ; Processor reset vector go to beginning of program
GOTO SETUP ;
ORG 0x004 ; Interrupt vector location. When an Interupt occurs, the program jumps here
MOVWF W_TEMP ; Save current W register contents
MOVF STATUS,W ; Move STATUS register into W register
MOVWF STATUS_TEMP ; Save contents of STATUS register in temporary register
; Interrupt Service Routine goes here
MOVF STATUS_TEMP,W ; Retrieve saved status 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