Software Tips
-
;Save the current state on interrupt
-
;(NOTE: _W must map in both Banks - e.g. 7F/FF)
-
Interrupt movwf _W
-
swapf STATUS,W ;Move STATUS w/o changing it
-
bcf STATUS,RP0 ;Switch to page 0
-
movwf _STATUS ;Save old status (swapped)
-
.
-
.
-
.
-
swapf _STATUS,W ;Load old STATUS (& unswap)
-
movwf STATUS ;also restores old page#
-
swapf _W,F
-
swapf _W,W
-
retfie
Previous slide | Next slide | Back to first slide | View graphic version |