| Fall 2001 Laboratory Notes: Computer Engineering II | ||
|---|---|---|
| Prev | Appendix A. Intel x86 Instruction Reference | Next |
LEA reg16,mem ; o16 8D /r [8086]
LEA reg32,mem ; o32 8D /r [8086]
LEA, despite its syntax, does not access memory. It calculates the effective address specified by its second operand as if it were going to load or store data from it, but instead it stores the calculated address into the register specified by its first operand. This can be used to perform quite complex calculations (e.g. LEA EAX,[EBX+ECX*4+100]) in one instruction.
LEA, despite being a purely arithmetic instruction which accesses no memory, still requires square brackets around its second operand, as if it were a memory reference.