I was struggling with the function pointer in Dallas 390 contiguous mode. It seems that the linker might not relocate the correct address in function pointer. Check the following code:
void Test(void) { UINT32 u32Tmp; u32Tmp = 0x12345678ul; TASK_PRN(("u32Func = %lx\n", u32Tmp)); u32Tmp = Test; TASK_PRN(("u32Func = %lx\n", u32Tmp)); }
Linker Bug confirmed No. You need to read the section in the Cx51 Compiler User's Guide about Language Extensions->Memory Types->Far. It contains the description of how "far" memory pointers are mapped on Dallas devices.