C51: PORTING IAR XMEM TO KEIL XDATA
Information in this article applies to:
I have a question about the way to define xmem address and data. I've used IAR and Archimedes for a long time and that is the reason I'm confused. Here is the situation:
In IAR and Archimedes I can use the following method to access xmem:
// assign xmem address 8000 to xmem1_add #define xmem1_add 0x018000 // assign xmem content at xmem1_data #define xmem1_data (*(char *)0x018000)
or I can define
#define xmem1_data (*(char *)xmem1_add)
How do I do this with the Keil compiler?
Try the following. They should work just fine.
#define xmem1_data (*(char xdata *)0x8000)
#define xmem1_add 0x8000 #define xmem1_data (*(char xdata *)xmem1_add)
Last Reviewed: Friday, September 29, 2006
of your data.