We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Keil C51 v7.20, 16MB contiguous mode for DS80C400. Why doesn't the following work?
unsigned char LookUp(unsigned char x) { const unsigned char far lookups[]= { 1,2,3,4, ...etc... , 125,126,127,128 // 128 bytes }; return lookups[x]; }
unsigned char LookUp(unsigned char x) { const unsigned char far lookups[128]= // *** SIZE SPECIFIED { 1,2,3,4, ...etc... , 125,126,127,128 }; return lookups[x]; }
const unsigned char far lookups[]= // *** ARRAY NOW GLOBAL { 1,2,3,4, ...etc... , 125,126,127,128 }; unsigned char LookUp(unsigned char x) { return lookups[x]; }
No, I didn't know there was a v7.50, the website lists 7.20 as the latest and that's all I have access to for now. In any case, your response has confirmed that I am not knowingly doing something wrong at the source code level so I guess I'll live with the workaround for now. Thanks.