Hi all I've a array located at code segment named
StandardModeType is a struct has some integer values StandardModeType code StandardModeTable_rc7_17[]={ ... }
StandardModeType code *xdata StandardModeTable_rc7[];
StandardModeTable_rc7[0]->StdVFreq StandardModeTable_rc7_17[0].StdVFreq
"what can cause this problem?" Not initializing the pointers in StandardModeTable_rc7[].
Non I was initialised well and addresses seem corrects. for (cnt=0;cnt<NbMember;cnt++) StandardModeTable_rc7[cnt]=&StandardModeTable_rc7_15[cnt]; But values at that adresses isnt match!!!!
Is what was previously StandardModeTable_rc7_17[] now StandardModeTable_rc7_15[]?
sorry I wrote wrong for (cnt=0;cnt<NbMember;cnt++) StandardModeTable_rc7[cnt]=&StandardModeTable_rc7_17[cnt];
Here..
StandardModeType code StandardModeTable_rc7_17[]={ ... /* you put data in here */ }
Hi, Just an aside, but apart from initialising 'initialisingStandardModeTable_rc7[]' do you ever modify the addresses stored in this array?. If no then why not remove this array altogether? Mark
I defined variable like the following StandardModeType code *xdata StandardModeTable_rc7[32]; so it has a finite dimension and I can see that each member show the right code space address but the values for these the same address differs. following are What I see from emulator
StandardModeTable_rc7[0]: struct STANDARDMODESTRUCT * &Code:2EFAH &StandardModeTable_rc7_17[0]: 2EFAH
This may be too obvious a question, but you don't have a banked application, do you? If so, then if your code table isn't located in an unbanked area or copied to every page, this problem could ensue.
I've a banked applicatio 4 banks, and I described problem more detail with a new thread today titled array and banking thx
Mustafa, That thread doesn't appear for me yet, but I suspect I know the cause of your problem now. You're looking at values with your pointer when the wrong code bank is selected. If you want this sort of thing to work automatically without your managing the code pages manually, you'll need to use the LX51 linker and create far pointers so that the data can be fetched from the proper code page.