This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Reading assembly defined structures from C files

Since .cdecls doesn't work in linear assembly, but including assembly code does. 

If I declare a structure in assembly, can I access it from C headers/sources? (It seems all forum questions where in the opposite direction)

Also can a linear assembly file use .include "defines.asm" that will have the .cdecls instruction in it (and nothing else)?

Thanks.

  • I'm sure you won't like these answers.

    Yaels Steinsaltz said:
    If I declare a structure in assembly, can I access it from C headers/sources?

    No.  To be more precise, there is no method to automatically propagate the data layout of a structure from assembly to C.

    Yaels Steinsaltz said:
    can a linear assembly file use .include "defines.asm" that will have the .cdecls instruction in it

    No.  None of source code seen by the linear assembler, whether by .include or otherwise, can have a .cdecls directive.

    Thanks and regards,

    -George