I'm trying to write a program that responds as fast as possible to an interrupt. I think I can prune out a bit of the context saving within the program, as i don't think i'm using the registers which are saved in any of the program... the context saving is thus (from the disassembler)
so, as I can gather from web searches, R0 and R1 are used for results of arithmetic operations, 0x3F is the SREG, and R24 / R25 are used for 16 bit operations - is that all correct? I think I might want still to save the SREG but otherwise I might get away with not saving any of them, as my program is quite simple. So, I have a couple of questions regarding this
- can i watch the registers R0, R1, R24, R25 inside a atmel studio C program to double check they don't change in the interrupt? Do I have to define a specific register name to watch or do they appear under different names in the IO view?
- can I edit the context saving from the C program, or can I only do this inside an assembly program? AND if I can only do this in an assembly program, will I be able to take a big short cut by writing a program in c, running a disassembler, then saving the disassmebly file as my program, of course editing out the commenting etc. that appears as a bookmark from the original c program?
- is it a bad idea to delete context saving? (i mean, obviously the answer is "yes" if you need the information in the registers, but as long as you're not using them...)