L7. x86 architecture and programming

LEA

Load Effective Address
Notation similar to MOV
source argument in memory
destination must be register
Loads the ADDRESS to the destination register, does not transfer data from memory
Treated like MOV - does not set flags

Usage

Multiplication by 3, 4, 5, 8, 9

a3 LEA eax, [eax + eax*2]
a=b×9 LEA eax, [ebx + ebx*8]
a=b1 LEA eax, [ebx - 1]
a=b+c30 LEA eax, [ebx + ecx - 30]
a=4×c+d LEA eax, [4*ecx + edx]
a=10×a+b LEA eax, [eax + eax*4] LEA eax, [ebx + eax*2]