I would like to change the order that some of the registers are stored on the stack when an interrupt occurs. Ideally I would like to store the IE register first. Does anyone know if it is possible to stop the C51 compiler from pushing and poping registers from the stack automatically in an interrupt routine, so that I can do this manually, in the order I would like?
"That's funny, I use the #pragma ASM directive and I can get both assembler and C to compile with ease." Not really. You're just making the compiler convert the whole source file to assembler - you still have no control over precisely what assembler mnemonics the compiler will use! You also throw away lots of other things that the compiler would otherwise give you - like source-level symbolic debugging. "After looking a bit more on the forum I discovered something too. Erik is everywhere on this forum being grumpy and uppity" Instead of searching out contributors' character traits, try searching for discussions of inline assembler - you will find plenty of cause to be grumpy about it...!