Ok, this time with the question... How should contexts be safely saved in a low priority interrupt when a high priority interrupt is also used (on a pic 18f)? The examples given in various datasheets and the example template are shown at the end, but I have also read that it is not a good idea to use the movff instruction if an interrupt could occur in the middle (of the movff instruction). Therefore if high priority interrupts are enabled, surely it would be safer to save contexts this way: LowInt: movwf WREG_TEMP swapf STATUS,W movwf STATUS_TEMP movf BSR,W movwf BSR_TEMP and restore them this way: movf BSR_TEMP,W movwf BSR swapf STATUS_TEMP,W movwf STATUS swapf WREG_TEMP,F swapf WREG_TEMP,W retfie or am I being unnecessarily cautious ? Thanks, James HI_INT_VECTOR CODE 0x0008 bra HighInt ;go to high priority interrupt routine LOW_INT_VECTOR CODE 0x0018 bra LowInt ;go to low priority interrupt routine CODE HighInt: ; *** high priority interrupt code goes here *** retfie FAST LowInt: movff STATUS,STATUS_TEMP ;save STATUS register movff WREG,WREG_TEMP ;save working register movff BSR,BSR_TEMP ;save BSR register ; *** low priority interrupt code goes here *** movff BSR_TEMP,BSR ;restore BSR register movff WREG_TEMP,WREG ;restore working register movff STATUS_TEMP,STATUS ;restore STATUS register retfie -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist