hi all I've an array located at code some segmet at adress 0x3125H and a pointer at xdata which points to it. this program contains 4 banks, when i run my software I see that pointer points to correct code address but I cant see correct values at this address. I've checked whether I use this pointer in an segment at the same code bank. I use pointer always at segments located at the same code bank. plus to use this variable at different segment (placed in a different code bank) what I 've to do? thanks all
Mustafa, My suspicion is that something has been missed in your banking layout and that this table of code constants is in fact NOT in the current bank when you're attempting to use your pointer to access it. What have you done to verify that both the table and the code that accesses it are in the same code bank? If you want to use data in a different code bank, you have several options. The first one involves carefully managing the bank switching yourself, or locating the code table to an unbanked area of code memory. The second is to use Keil's LX51 linker and use far pointers which will select the proper bank for you.