I have all of my software code made in 8051 assembler. The R0-R7 (Bank 0,1)registers, accumulator, and DPTR, are used in the most of my code, like a functions arguments. How could I do, to call a "C" subrutine and hold the integrity of my code? What is the best way, to preserve or separate, two parts of differents codes? Thank you.
Thank you Dan and Andy. What do you mean (context)
1. Save integrity (context). 2. Call C "subrutine". 3. Restore integrity (context).
{ push_registers(); // 1. function_in_c(); // 2. pop_registers(); // 3. }