蚂蚁举木头含义:汇编指令 mov和movl

来源:百度文库 编辑:中财网 时间:2024/04/29 11:07:59

汇编语言(Assembly Language)中 mov和movl 有什么区别

In a word, they belong to two instruction set, movl is AT&T and mov is Intel

AT&T汇编语言是UNIX下惯用的汇编语言格式
l,w,b是AT&T汇编语言中用来表达操作属性的限定符
l(long)是长字 (2字,4字节),
w(word)是字
b(yte)是字节
加在命令的后边
相当于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 汇编语言中就相当于:
sub esp,8
lea eax,dword ptr [ebp-792]
push eax
mov eax,dword ptr [ebp- 796]
...