Pointers

Need a clarification.

I want to define two poiners. One pointing to an area in XRAM and the other within CODE memory.

I further want both of these pointers to be stored in XRAM.

unsigned char xdata *xram_pointer;
unsigned char code *code_pointer;

This defines the pointers. But, how do I get them to be stored in XRAM?

As I understand it, this is how it is done:

unsigned char xdata * xdata xram_pointer;
unsigned char code * xdata code_pointer;

Here the "xdata" next to the pointer name specifies that the pointer be stored in XRAM memory.

Is this correct?

Thanks.

Parents Reply Children
No data
More questions in this forum