Greetings,

GCC uses AT&T/UNIX assembly syntax which I really detest. Fortunately GCC has provided us with the '-masm=intel' switch to use Intel assembly syntax instead. The only problem that I have is to compile even the most simple inline assembly code when using the Intel assembly syntax. Does anyone has any experience with the Intel assembly syntax when compiling code with GCC?

For example, the following two code snippets do not compile:

Code:
DWORD dwTest;

main()
{

    asm( ".intel_syntax noprefix;" );
    asm( "mov ds:_dwTest, 0xDEADBEEF;" );

    return 0;
}
Code:
main()
{

    DWORD dwTest;

    asm( ".intel_syntax noprefix;" );
    asm( "mov eax, _dwTest;" );

    return 0;
}
Could someone enlighten me or tell me how I should interpret the Intel assembly syntax with GCC?

Thanks for your time,
Ktulu