I'd like to declare a struct in a C51 file and access members of the struct in an assembly (A51) file. Is there an easy way to do this? I can declare the name of the struct as "extrn" in the assembly file, but how do I get the offsets of the struct members into the assembly file? -dean
Thanks for the reply That's kind of what I thought. I was hoping to get some legacy assembly code to work with some new C code in a way that would allow the compiler to guarantee address compatibility between the assembly code and the C code. The members of the struct are located in xdata space in fixed locations in a dual port RAM so the risk of them moving in the future is quite low. Therefore, I'll just set them manually using symbol_name xdata <address> If there's anyone that knows a neat way to get offset information for members of a C struct passed into an assembly file (presumably by the linker) I'd be eager to hear about it. -dean