A
Alexander
I always saved the context like the example below and restored it in reverse
order.
With the new series you are able to push and pop file-registers.
Is it possible to simply push and pop the registers???
If not can I use movff for it???
ThanX
Alexander
ORG 0x04 ; interrupt vector location
GOTO ISR ; Interrupt Service Routine
ISR
;************************
;*** ISR CONTEXT SAVE ***
;************************
movwf W_TEMP ; context save: W
swapf STATUS,W ; context save: STATUS
movwf STATUS_TEMP ; context save
clrf STATUS ; bank 0, regardless of current bank
movfw PCLATH ; context save: PCLATH
movwf PCLATH_TEMP ; context save
clrf PCLATH ; page zero, regardless of current page
bcf STATUS,IRP ; return to bank 0
movfw FSR ; context save: FSR
movwf FSR_TEMP ; context save
;*** context save done ***
order.
With the new series you are able to push and pop file-registers.
Is it possible to simply push and pop the registers???
If not can I use movff for it???
ThanX
Alexander
ORG 0x04 ; interrupt vector location
GOTO ISR ; Interrupt Service Routine
ISR
;************************
;*** ISR CONTEXT SAVE ***
;************************
movwf W_TEMP ; context save: W
swapf STATUS,W ; context save: STATUS
movwf STATUS_TEMP ; context save
clrf STATUS ; bank 0, regardless of current bank
movfw PCLATH ; context save: PCLATH
movwf PCLATH_TEMP ; context save
clrf PCLATH ; page zero, regardless of current page
bcf STATUS,IRP ; return to bank 0
movfw FSR ; context save: FSR
movwf FSR_TEMP ; context save
;*** context save done ***