Just a very minor point on using SWAPF to push/pull without affecting STATUS. *IF* (a VERY big IF) the push/pull is the boundary of the sole interrupt service routine, AND the main code doesn't affect any STATUS bits, then you can leave out STATUS from the push/pull, and push/pull W with plain MOVWF and MOVF. Result (for '84) can look like something I did recently: ORG 4 ; Interrupt vector ISR ; Interrupt service routine ; explanation and description deleted............ MOVWF STAKW ; Stack W BUT NOT S (not used in main routine) ; SWAPF STATUS, W ; Pre-swap STATUS for storage ; MOVWF STAKS ; Note GIE cleared by responding to interrupt :::::::::::::::::: ENDINT BCF INTCON, T0IF ; Clear Timer interrupt that got us here ; STATUS not recovered, as not saved, as not used in main routine ; SWAPF STAKS, W ; Recover (and unswap) status register ; MOVWF STATUS ; SWAPF STAKW, F ; Preswap W ; SWAPF STAKW, W ; And recover it MOVF STAKW, W ; Affects STATUS, but don't care RETFIE ; Also re-enables interupts by setting GIE The specific application was a very simple one where everything depended on timer ticks and the main routine was a simple loop. Remembering the discussion a few weeks back about comments, you will note that I've included several reminders to myself about what the code does, and that the conventional push/pull of STATUS and W using SWAPF is not deleted, merely commented out in case some future revision means the main loop has to use STATUS. No doubt some will think I've over-commented, but I don't do very much PIC programming, and find it very easy to forget why my old code looks the way it does. You could argue, with much justification, that the push/pull should always ensure that STATUS is returned in the same condition it was before the routine - there were no overriding requirements of timing or space which meant saving a few instructions actually mattered. In this case it did mean that the number of cycles lost in the prescaler (reset when the timer was reloaded) was reduced by two, and I can envisage situations where that might be useful. Tim Forcer Tim Forcer tmf@ecs.soton.ac.uk Department of Electronics & Computer Science The University of Southampton, UK The University is not responsible for my opinions