分类: C/C++
2013-05-02 10:03:32
汇编语言(Assembly Language)中 mov和movl 有什么区别(举例说明)
In a word, they belong to two instruction set, movl is at%t and mov is intel
参考正确回答:
AT&T汇编语言(Assembly Language)是UNIX下惯用的汇编语言(Assembly Language)各式
l,w,b是ATT汇编语言(Assembly Language)中用来表达操作属性的限定符
l是长字(4字节),
w是双字
b是唯一字节
加在命令的后边
相当于intel中的
dword ptr
word ptr
byte ptr
比如:
subl $8, %esp
leal -792(%ebp), %eax
pushl %eax
movl -796(%ebp), %eax
sall $8, %eax
addl 12(%ebp), %eax
pushl %eax
call _strcpy
addl $16, %esp
在intel 汇编语言(Assembly Language)中就相当于:
sub esp,8
lea eax,dword ptr [ebp-792]
push eax
mov eax,dword ptr [ebp- 796]
...
ATT各式的汇编语言(Assembly Language)和intel编的差别没去外国疑问参看有关AT&T汇编语言(Assembly Language)的书
l根本是32位的意思。