I call a short and easy function out of an timer interrupt. This causes the c51 compiler to push all registers (A, B, DPH, DPL, PSW AR0..AR7) to the stack without any necessarity (they are not changed in this function). The fuction I call is in a seperate *.c file. How can I tell the C51-Compiler not to do this to save dataRAM and runtime? I can not use the using functionality because of register access.
Hello, the called function ist called from the int and from the "normal" program. but the global register coloring is working correct!!
A good thing to do for 8051 programs is to have the interrupt handler use a different register bank and to make special copies of all functions that needs to be called from the ISR, that also makes use of this register bank.
Hello Per, thanks for this hit, this could be a good idea and int will work!