X86-assembly/Instructions/lea

From aldeid
Jump to: navigation, search
You are here:
lea

Description

The lea (load effective address) instruction is used to put a memory address into the destination.

Syntax

lea destination, source

Examples

lea eax, [ebx+8]
Put [ebx+8] into EAX. After this instruction, EAX will equal 0x00403A48.
Info.png
Note
In contrast, the instruction mov eax, [ebx+8] will make EAX equal to 0x0012C140
 +------------------+                  +------------+
 | Registers        |                  | Memory     |
 +------------------+                  +------------+
 | EAX = 0x00000000 |       0x00403A40 | 0x7C81776F |
 | EBX = 0x00403A40 |       0x00403A44 | 0x7C911000 |
 +------------------+       0x00403A48 | 0x0012C140 |
                            0x00403A4C | 0x7FFDB000 |
                                       +------------+

Comments

blog comments powered by Disqus