Does FASM uses Intel Syntax?

北城余情 提交于 2019-12-25 01:36:00

问题


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


回答1:


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.



来源:https://stackoverflow.com/questions/27682380/does-fasm-uses-intel-syntax

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!