This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

xdata &expanded ram( xram)

friends,i have interfaced 512k nvram to 89c668 (philips)
but i dont know how to declare variables to xdata and
xram.Is there any keyword to define variables seprately in xdata and xram at compile time.

____following variable i am defining in nvram

unsigned long int xdata sector_location _at_ 0x0001;
int xdata sector_number _at_ 0x0005;
unsigned char xdata starting_info[10] _at_ 0x0007;
unsigned char xdata memory_space[65535] _at_ 0x0000;
unsigned char xdata check_location _at_ 0x0030;
unsigned char xdata ce_overflow _at_ 0x0027; ;

while 89c668 has 8k xram space that memory(all) also i want to store variables.

but because my array memory_space[65535] excceding xdata space .i cannot define more variables,it give
s me xdata space overflow error. hence if i have to define variables every time i have to use _at_ and addressed according to bytes.

like
data char SendInst[500] _at_ 2098;
xdata char SendCBill[50] _at_ 2598;
xdata char SendDK[200] _at_ 2648;
xdata char temptamper[40] _at_ 2840;
xdata char SendTamper[40] _at_ 2880;
xdata char TP1[10] _at_ 2920;
xdata char TP2[10] _at_ 2930;
xdata char CB[10][150] _at_ 2940;
xdata char DIALnumber[15] _at_ 3090;
xdata char SMSnumber[15] _at_ 3105 ;
xdata char Usernumber[15] _at_ 3120 ;
xdata char Inbox[200] _at_ 3135 ;
this gives me warning overlapped areas but my code runs.

i am using smallmemory model and i dont want to declare all variable in nvram(except declare first). plz help me.....

0