Assembly (,%eax,4)

吃可爱长大的小学妹 提交于 2019-12-01 19:49:03

This instruction jumps to the location whose value is located at the address calculated as %eax * 4 + 0x804a180.

The * is used in AT&T syntax to indicate indirect jumps and calls. It basically means "jump to the location pointed to by this, instead of the value of this". It is useful to differentiate the following instructions:

jmp myAddress  # Jumps to the location myAddress
jmp *myPointer # Jumps to the location contained at myPointer

As for the empty value, it is treated as 0. The full form of AT&T addressing is offset(%base, %index, multiplier), but any of these values can be left out. The default for each, except the multiplier (defaults to 1), is 0. Most of the time, you can just leave them out, but if you have an index and no base you need the comma there so that the assembler can tell which it is.

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