On Mon, Jul 21, 2014 at 09:47:05PM +1200, IVP wrote: > Sorry, I don't do C myself so can't answer that. I'd be surprised > if it did because it adds instruction cycles to an ISR that may be > or definitely are not needed. That is, some ISRs are required to > be as short and/or reactive as possible Saving registers is usually done by compilers. The exact implementation will vary. Usually everything that might change is saved, and yes, this does indeed slow the code. Saving registers only if they are used is an optimisation some compilers may do. I don't know if any of the compilers mentioned in this thread do it. Can easily check by reading the generated instructions. Therefore switching to assembly and making these decisions yourself may save cycles at the expense of more code care. On Mon, Jul 21, 2014 at 04:59:24AM -0500, Richard R. Pope wrote: > Jan-Erik has confirmed that the compiler does save the context info > automatically. p.s. this seems redundant; Joe is on the list and should have received Jan-Erik's post. ;-) Remember that posts may arrive out of order for any of us. --=20 James Cameron http://quozl.linux.org.au/ --=20 http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .