Does FASM uses Intel Syntax?
Asked Answered
P

1

2

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)?

Pellitory answered 29/12, 2014 at 1:32 Comment(1)
There isn't a single intel syntax, unfortunately. It's mostly used as a term to differentiate from at&t, and has some general features such as dst, src operand order, but otherwise it has multiple flavors. Consult the fasm manual to see what it accepts.Kella
B
5

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.

Bickel answered 29/12, 2014 at 1:40 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.