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

variables at same memory places

I have declared in source file src1.c following variables.

xdata unsigned char keybuffer[8];
unsigned int keys;
unsigned char keyctr;


I have an another source file src2.c and I want to declare
variables into same memory places.

How can I declare in src2.c variables into same memory area with
variables in src1? I know that my software do not use variables declared in src1.c in this case.

Is there something like following way to use?

extern unsigned char keyctr;
unsigned char var2 _at_ keyctr; //compiler does not accept this.

regards
Arto