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

How to define constants in the Program Memory Space (CSEG) as opposed to defining in the data space

IN assembler, I can define as follows:
TABLE_CONSTANTS:
DB 0x7,0x18,0x18,0x24,0x24,0x7e
DB 0x42,0x42, 0x00,0x00

For Keil C program, I can define the above
as follows:
char xdata table_constants[] = {
0x7,0x18,0x18,0x24,0x24,0x7e,
0x42,0x42,0x00,0x00
}

The DB directive in assembler stores byte constants in program memory space where as the C code stores the table in ERAM space. I want to force the table_constant array to use program memory space (CSEG). How can I do this in Keil 'C' and force the compiler to put the table in Program memory space?

Parents Reply Children
No data