??? 05/16/10 17:48 Read: times |
#175939 - asxxxx tools Responding to: ???'s previous message |
Hi Erik,
Some background on the asxxxx tools which contains the 8051 assembler and linker used by sdcc. It is the only free (as in beer) and open source assembler I know that supports a separate linker with libraries. After sdcc branched it the author changed the license and it was no longer allowed to change it. The sdcc developers have been very reluctant to change anything to the package from when it was originally copied. Only recently has it also turned free (as in usage) since it moved to a GPL license. This explains why neither the assembler nor its documentation changed much. Now back on topic. When you place variables in C in xdata with the __at keyword the behaviour depends on whether you added initializers or not. Originally sdcc only created equates (=) for them and did not allocate space. Some years back I changed that so it does allocate when you use initializers. This prevents other variables being placed in the same region by the linker. (For this I had to change the behaviour of the linker btw.) If you look at the generated .asm I think you'll see the difference and I hope you get the idea. Maarten |