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
Why not use the C way of declaring overlayed variables - the union? That works with all compilers, and since it is clearly visible in the source code, the next developer to handle the source code will not get any bad surprises that his variables may be overwritten by other functions.