Hi, In an older version of my software, I use a specific SFR (CNTRL_REG) mapped on 0xC5 SFr address. In the new version, I need to map it at 0xC1. I thought it was very easy just by changing the definition line from
sfr CNTRL_REG = 0xC5
sfr CNTRL_REG = 0xC1
Sorry for adding a new message, but I found the problem and I think that it may be interessant. In fact, all the problems come from the
#pragma src
Aha! The #pragma src directs the compiler to generate a .src assembly source file as its output; you must then pass the .src file to the Assembler to generate a .obj Object file. In uVision2, check the 'Assemble SRC File' option. If you use #pragma src, the compiler does not generate a .obj object file! If you have an old .obj file kicking around, the linker will still link it but it won't reflect the changes to your 'C' source! See the C51 Manual and the uVision2 "Getting Started" guide.
See the thread "how to compile c file that includes asm routines" http://www.keil.com/forum/msgpage.asp?MsgID=1003