Verified Jobs Live
x86 Medium Level ~3 min read

How do MOV and LEA differ in Intel-syntax x86-64 assembly?

Interactive Practice Mode
Formulate your thoughts or take notes before revealing the model solution.
Model Answer & Deep-Dive Explanation

MOV with a memory source reads stored data, while LEA computes an effective address expression without reading memory at that address. LEA is often used for pointer calculation or limited arithmetic involving a base, index, scale, and displacement. In the example, LEA computes rdi + 4*rsi + 8, while MOV loads a 32-bit value from that address. LEA does not check whether the computed address points to valid data. Distinguish brackets used as an addressing expression from an actual memory access performed by the instruction.