> >You only need to save/restore the registers that your interrupt > >service routine uses... You don't even need to store W and STATUS, > >if your ISR doesn't affect them. > > For an example of this: > > org 004h ; Interrupt Service Routine > bcf T0IF ; Clear interrupt source > btfsc TimerRunning ; Timer active? > decfsz ms_Timer,F ; Doesn't touch STATUS register > nop ; Needed because of DECFSZ > retfie ; Back to caller Another useful variation: ... decfsz ticks,f retfie movwf save_w ; If we had enough ticks... movf STATUS,w ; we do the "main" part of our ISR... movwf save_stat ; and now have to save status/W In many cases, you'll have parts of the ISR that need to use W/status, but if 90% of interrupts don't need them you can save time by only saving when necessary.