Hello everyone,
how can i access a C declared structure in assembly?
ex.
// C declaration in "something.h"
...
struct MY_STRUCT {
unsigned int First;
unsigned int Second;
unsigned int Third;
};
extern struct MY_STRUCT MyStruct;
...
// declaration as global variable in C file, "globals.c"
...
struct MY_STRUCT MyStruct;
...
Then i need do refer to MyStruct.Third in assembly, and i don't know how .
How can i refer to that element in assembly language?
If i have in "program.asm" something like
.ref _MyStruct
....
MOV AR1,#_MyStruct ; this load AR1 with address of MyStruct, and works.
....
MOV AR1,#_MyStruct.Third ; this doesn't work and gives me error.
....
How can i access directly Third element. ?