Possible Duplicate:
What's the purpose of the LEA instruction?
When I need the value at an address I can use the effective address e.g. push dword [str+4]. But when I need to reference an address — I can’t use push dword str+4 (which to me is the obvious and intiutive way to do it).
Instead need to use lea EAX, [str+4] and then push EAX. This a bit confusing and also gives an extra processor instruction, albeit a ‘zero-clock’ one. (See this answer)
Is there some hardware level explaination for this difference, or is it just a quirk of (NASM) assembly syntax?
Edit:
Okay so this comment asks the same question as me. And it is answered in this comment just as Lucero’s answer – the X86 does not support such addressing.
Assembly instructions directly represent x86 opcodes (no transforming compilation takes place as in higher-level languages). The opcodes have their limitations in what they can represent; as such, while address computations are possible as part of the x86 adressing, value computations are not. LEA covers this gap by storing the result of the address computation in any register instead of only consuming it internally.