assemblyx86attoperandsaddressing-mode

How to read scaled-register memory operands in AT&T syntax?


cmp    %eax,0x80498d4(,%ebx,4)

I understand that the eax register is being compared to something, but I have no idea what eax is being compared to.

In other words, what does

x80498d4 (,%ebx,4)

mean?


Solution

  • It compares eax to the contents of address [0x80498d4 + (4 * ebx)]

    Source: http://cs.nyu.edu/courses/spring12/CSCI-GA.1144-001/addressing_modes.pdf