mov instruction in x86 assembly

荒凉一梦 提交于 2019-12-01 03:10:25
movl 8(%ebp), %edx

is in "AT&T Syntax"; in this syntax, the source comes first and the destination second. So yes, your belief is correct. Most documentation uses the "Intel Syntax", which has the reverse ordering. This is a source of considerable confusion for people new to x86 assembly.

In Intel Syntax, your instruction would be written:

mov edx, [ebp + 8]

Note the absence of % before the register names, and the use of square brackets instead of parentheses for the address, and the lack of an l suffix on the instruction. These are dead giveaways to know which form of assembly you are looking at.

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