Hello all! I am new to using SDCC, and I am working with some legacy 8051 codebase that is written in assembly. I would like to port one function at a time from assembly to C, eventually converting the entire codebase while testing it as I go. However, I need to be in control of how the C generated code uses registers/RAM.
There are two main issues: 1. make the C code implement "callee" saving of registers, so that the calling assembly code doesn't have to be rewritten 2. make sure that the C functions do not clobber the existing global internal RAM variables. I either need to reserve the known used areas of RAM (blacklist), explicitly define the RAM that is okay to use for the "overlay" section (whitelist), in my case using external RAM would be acceptable since the assembly doesn't use it except for external bus peripherals. I could also forbid using global RAM altogether (like the reentrant option), but I think that might use too much stack... I have tried Googling things, but I can't seem to find straightforward documentation on function attributes that might be useful. Any insight would be appreciated! Thanks, --Forest
_______________________________________________ Sdcc-user mailing list Sdcc-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sdcc-user