我需要一些帮助来确定这些x86汇编语言的行。在第二个lea之后,%eax总是5并且%ebx会变成4吗?另外我不确定添加和比较是做什么的。任何帮助表示赞赏。
mov $0x5,%eax
lea -0x20(%ebp),%esi
lea -0x1(%eax),%ebx
add 0x4(%esi,%ebx,4),%eax
cmp %eax,(%esi,%ebx,4)
je 0x8048dce
答案 0 :(得分:2)
mov $0x5,%eax - sets eax to 5
lea -0x20(%ebp),%esi - loads the dword value at ebp-0x20 into esi
lea -0x1(%eax),%ebx - sets ebx to the value of eax-1 (i.e. 4)
add 0x4(%esi,%ebx,4),%eax - adds the dword value at esi+ebx*4+4 to eax
cmp %eax,(%esi,%ebx,4) - compares eax to the dword value at esi+ebx*4
je 0x8048dce - branches if they are equal