I fully agree assembler is currently best for writing interrupt handlers, since .
One irritation, even with assembler, is that the chip doesn't have any registers reserved for ISR use. (Some chips have a shadow set which come into play.) I've been mulling over making a request for a compiler option to tell the compiler not to use registers R24 to R27. (There is already one to tell it not to use R32 to R63 for use with future versions of the chip with only 32 registers.) If we had some registers we knew the compiler wouldn't touch in ordinary routines we could use them as scratch registers in an ISR without having to save and restore them first, speeding things up a little.
I'd turn off the option by default, since not everyone would need it. (The standard libraries would have to be compiled with the option on though.) Any thoughts on this suggestion?
Tim