lea

8086 and later

Load Effective Address

lea reg16, mem | lea reg32, mem | lea reg64, mem | lea reg16, imm16 | lea reg32, imm32 | lea reg64, imm32

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. \c{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.

The size of the calculation is the current address size, and the size that the result is stored as is the current operand size. If the address and operand size are not the same, then if the addressing mode was 32-bits, the low 16-bits are stored, and if the address was 16-bits, it is zero-extended to 32-bits before storing.

Loading...

Forms

Every form of lea the assembler accepts, from NASM's own instruction table. The second column is the processor that introduced the form; a badge marks a form that needs an extension, that is lockable, or that long mode dropped.

FormSinceNotes
lea reg16, mem8086
lea reg32, mem386
lea reg64, memx86-64long
lea reg16, imm168086
lea reg32, imm32386
lea reg64, imm32x86-64long