I've contacted the SDCC-Dev Team
On Sat, 27 Jul 2013, Stefan Falk wrote:
Hello to everyone who receives this!
I'm sorry to ask that probably rather simple question about the ASXXXX Cross Assembler but I was wondering if or how I could change the standard SFR addresses?
The processor that I am using is based on the Intel 8051 but a lot of its registers do have new addresses.
So, is there a way to tell the SDCC to tell the ASXXXX to ignore the predefined SFR and to use mine instead?
The answer
I don't think you can without editing the ASXXXX source. However, SDCC only uses a few of the assembler's built-in symbols (from memory, I think it's just ACC, B, DPL, DPH, PSW, and SP) in its code generator. I would be extremely surprised if anyone moved these fundamental CPU related registers. All of the SFR registers defined as the C level (for example, by using #include ) will be explicitly defined at the assembly level, but with an underscore prefix, so it's possible to change the addresses for these symbols to whatever you need, and ignore the predefined symbols. You just need to make sure any assembly you write uses the symbols with the underscore prefix (i.e. "mov a,_P2" rather than "mov a,P2").
Erik