Hello,
I have the following line of code which I need to store in the IDATA memory starting from 92H.
char code *text_to_compare = "Tesing";
How can I achieve this please?
Use the code below:
idata unsigned char imem[6] _at_ 0x92; // creates 6 bytes of storage at 0x92 in // idata space idata unsigned char *text_to_compare; // creates pointer to idata memory text_to_compare = &imem; // assigns pointer to imem
The _at_ allows you to assign absolute memory locations to variables.
If you look at the pointers entry in the C51 manual it describes how to assign pointers to specific memory areas.