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.
Note that you can't just add an isolated 'C' file to an assembler project - 'C' requires a certain amount of initialisation & runtime support.
By far the easiest way to do this is to ensure that your program's main() is in 'C', and have that call your assembler entry point.
That could be as simple as:
void main( void ) { asm_main(); }