how to make struct member pointer in assembly?

Posted by sillis on Stack Overflow See other posts from Stack Overflow or by sillis
Published on 2010-06-02T08:42:43Z Indexed on 2010/06/02 8:43 UTC
Read the original article Hit count: 131

Filed under:
|

I`m trying to create a macro which would make easier to point to a structs member. Currently i am pointing to a structs member in assembly file using the STRUCT_NAME + offset method.

For example if i want to point structs third member,i would have to do it like this: STRUCT_NAME + 3.

This seems stupid way to do it, and if i insert more members in the struct, i have to update all the offset values in the code.

Is there a way to point using STRUCT_NAME + macro(struct_name, member_name) ?

I`m using texas instruments TMS320C28x hardware.

Thanks!

© Stack Overflow or respective owner

Related posts about c

    Related posts about asm