x86中带有括号和地址的CMP [英] CMP in x86 with parentheses and address
本文介绍了x86中带有括号和地址的CMP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在x86汇编语言中有以下一行,我不知道它的作用...
I have the following line in x86 Assembly language that I don't know what it does...
cmp %eax,0x80498d4(,%ebx,4)
我知道它正在比较语句的两半,但是我不知道地址在其中做什么以及括号在做什么.一些澄清将不胜感激!
I know it's comparing the two halves of the statement but I don't know what the address does in it and what the parentheses do either. Some clarification would be much appreciated!
推荐答案
此形式代表的AT& T语法
In AT&T syntax this form represents
偏移量(基本寄存器,索引寄存器,索引刻度)
OFFSET(BASE REGISTER, INDEX REGISTER, INDEX SCALE)
所以表示的地址是BASE REGISTER(如果存在)+ INDEX * SCALE(如果存在)+ OFFSET的值,所以
so the address represented is the value of BASE REGISTER (if present) + INDEX * SCALE (if present) + OFFSET, so
您的情况下为EBX * 4 + 0x80498d4.
EBX*4 + 0x80498d4 in your case.
这篇关于x86中带有括号和地址的CMP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文