I need function who will read string from specific memory (code, idata, xdata memory)!
It will be used for display driver, that means the main program can't see functions from dipspaly driver only main functions of display driver!
Preciously I need 3 functions: 1 for string in code, 1 for string in idata and 1 for string in xdata. Or help with existing I have - I dont know how it working.
int _wr_str_d(uint d) { int j; uchar k; _clr_scr(); kursor=7; pozicija=-1; j=0; while ((k=*(uchar idata *)(d+j))!='\0') { _wr_char(k); j+=1; } return 0; }
Code are same for 3 functions diference are in name of memory. Main program dont call function direkt. he only call DisplayHandler(int p, int n) where is p - number assigned to function, n - are parameter.
Have you looked-up "Generic Pointers" in the Manual?
http://www.keil.com/support/man/docs/c51/c51_le_genptrs.htm
Yes I look at him but is not what i looking!
In that case, you'd better explain why it's not suitable!
How can anyone suggest a better solution if they don't know what's wrong the previous suggestion?!
View all questions in Keil forum