User`s manual

Dynamic C Users Manual digi.com 219
xdata
Declares a block of data in extended flash memory.
xdata name { value_1, ... value_n };
The 20-bit physical address of the block is assigned to name by the compiler as an unsigned long variable.
The amount of memory allocated depends on the data type. Each char is allocated one byte, and each
int is allocated two bytes. If an integer fits into one byte, it is still allocated two bytes. Each float and
long cause four bytes to be allocated.
The value list may include constant expressions of type int, float, unsigned int, long,
unsigned long, char, and (quoted) strings. For example:
xdata name1 {'\x46','\x47','\x48','\x49','\x4A','\x20','\x20'};
xdata name2 {'R','a','b','b','i','t'};
xdata name3 {" Rules! "};
xdata name4 {1.0,2.0,(float)3,40e-01,5e00,.6e1};
The data can be viewed directly in the dump window by doing a physical memory dump using the 20-bit
address of the xdata block. See Samples\Xmem\xdata.c for more information.