HI,
I am writing an assembly for a simple C function, I want to access structure elements whose values are set in C. I want to access the structure elements by using dot operator in assembly. For Eg.
Structure declaration In C file
is
typedef struct Mystruct
{
int a;
int b;
}Mystruct;
Mystruct Ostruct;
It is initialized as
Ostruct.a = 10;
Ostruct.b = 20;
Now the call goes to a function in assembly. I want to access the structure variables, I tried like
.global _Ostruct
MVKL _Ostruct,A3
MVKH _Ostruct,A3
LDW *A3(Ostruct.a),A7
But Its giving assembly error like missing struct\union tag.
Can somebody help in getting me out of this issue. Should I redeclare the structure in assembly file to access ithe members or add a tag to the existing structure & use it?
Regards,
Santhosh