I have a simple instruction add $100, 100(%eax, %edx, 8)
I understand that 100(%eax, %edx, 8)
resolves to the memory address 100+%eax+(%edx*8)
but what I fail to understand is, does it add 100 to this address OR to the value stored at this address.
Issues
- In AT&T
src, dest
is the order. So technically100(%eax, %edx, 8)
should be the destination - Now, it should technically add to the address (and not the value at that addr) but it does not make intuitive sense
- Am I wrong to say
100(%eax, %edx, 8)
resolves to100+%eax+(%edx*8)
and is it rather that it resolves to(100+%eax+(%edx*8))
? Where the outer brackets are dereferencing the address inside it?
Resources I tried checking already
- Intel® 64 and IA-32 Architectures Software Developer’s Manual Volume 2 (2A, 2B, 2C & 2D): Instruction Set Reference, A-Z
- http://www.jagregory.com/abrash-zen-of-asm/#mov-move-copy-right-operand-into-left-operand
- I'm not exactly sure what this x86 Add instruction is doing
- x86 Assembly Memory - What does the "add" instruction do?
- https://docs.oracle.com/cd/E19455-01/806-3773/instructionset-19/index.html
- http://sourceware.org/binutils/docs-2.17/as/i386_002dMemory.html#i386_002dMemory
Do note, I have not read all of these completely. I do not understand the way they explain perhaps. It is my humble request for you to put it in as much simplicity and detail as possible