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

Locating members of a struct variable to absolute memory locations

I would like to know if I can use "_at_" to locate struct members to absolute memory locations. For instance, I have a struct variable defined as following,

xdata struct {

	unsigned char member1;
	unsigned char member2;
	.
	.
	unsigned char member5;
	unsigned char member6;

	}	myStruct;

myStruct.member1 to myStruct.member5 are located in a contiguous memory block, but myStruct.member6 is located somewhere else for a backward compatibility purpose. I can surely declare this "stray" member as an individual variable, nevertheless, I just think it would be nice to access it via a data structure for its consistancy. Can I do this by using "_at_"?

Thank you all.

Parents Reply Children
No data