Search code examples
assemblyx86fasm

Does FASM uses Intel Syntax?


I have tried compiling the following code in FASM:

mov DWORD PTR [ebp - 4], 1234567  

It gave me an "Invalid Expression" error. However the following code worked:

mov DWORD [ebp - 4], 1234567 

So does FASM uses Intel Syntax (I am assuming that the first line of code is compliant with Intel Syntax)?


Solution

  • It gave me an "Invalid Expression" error.

    Unlike MASM (and others), FASM doesn't need "ptr".

    So does FASM uses Intel Syntax?

    Yes.

    But there are some differences between different assemblers, for example:

    Loading an address:

    • MASM: mov eax, offset memvar
    • FASM: mov eax, memvar

    Loading a value:

    • MASM: mov eax, memvar
    • FASM: mov eax, [memvar]

    I suggest you to read the FASM Programmer's Manual.