Take the 2-minute tour ×

I would like to know Whats the difference between these instructions.




share|improve this question
duplicate: stackoverflow.com/questions/1658294/… –  Nick Dandoulakis Nov 9 '09 at 8:52
thanks nick. First of all, I wouldn't have found an answer to this question by looking into that link. Here I was looking for a specific info, the discussion in the link you provided is more genral in nature. –  naveen Nov 9 '09 at 10:13
I upvoted @Nick's dup ages ago but vtc'd just now. On reflection, I was too hasty and now with naveen that a) the other question does not answer "what's the difference" and b) this is a useful question. Apologies to naveen for my mistake - if only I could undo vtc... –  Ruben Bartelink Jul 31 '12 at 13:18
add comment

6 Answers

up vote 18 down vote accepted
  • LEA means Load Effective Address
  • MOV means Load Value

In short, LEA loads a pointer to the item you're addressing whereas MOV loads the actual value at that address.

The purpose of LEA is to allow one to perform a non-trivial address calculation and store the result [for later usage]

LEA ax, [BP+SI+5] ; Compute address of value

MOV ax, [BP+SI+5] ; Load value at that address

Where there are just constants involved, MOV (through the assembler's constant calculations) can sometimes appear to overlap with the simplest cases of usage of LEA. Where its useful is if you have a multi-part calculation with multiple base addresses etc.

share|improve this answer
add comment

If you only specify a literal, there is no difference. LEA has more abilities, though, and you can read about them here:


share|improve this answer
I guess, with the exception that in GNU assembler it's not true when it comes to labels in the .bss segment? AFAIR you can't really leal TextLabel, LabelFromBssSegment when you got smth. like .bss .lcomm LabelFromBssSegment, 4, you would have to movl $TextLabel, LabelFromBssSegment, isn't it? –  JSmyth Feb 18 '13 at 10:32
add comment

The instruction MOV reg,addr means read a variable stored at address addr into register reg. The instruction LEA reg,addr means read the address (not the variable stored at the address) into register reg.

Another form of the MOV instruction is MOV reg,immdata which means read the immediate data (i.e. constant) immdata into register reg. Note that if the addr in LEA reg,addr is just a constant (i.e. a fixed offset) then that LEA instruction is essentially exactly the same as an equivalent MOV reg,immdata instruction that loads the same constant as immediate data.

share|improve this answer
add comment

it depends on the used assembler


mov ax,table_addr

in MASM works as

mov ax,word ptr[table_addr]

so it loads the first bytes from table_addr and NOT the offset to table_addr

you should use instead

mov ax,offset table_addr


lea ax,table_addr

which works the same.

lea version also works fine if table_addr is a local variable eg.

some_procedure proc

local table_addr[64]:word

lea ax,table_addr
share|improve this answer
thanks a lot, its just that i cannot mark more than one as answer :( –  naveen Nov 9 '09 at 10:07
The difference between the x86 instructions MOV and LEA most definitely does NOT depend on the assembler. –  I. J. Kennedy Jun 17 '12 at 23:18
add comment

mov eax ,var == lea eax [var]

share|improve this answer
add comment

The difference is subtle but important. The MOV instruction is a 'MOVe' effectively a copy of the address that the TABLE-ADDR label stands for. The LEA instruction is a 'Load Effective Address' which is an indirected instruction, which means that TABLE-ADDR points to a memory location at which the address to load is found.

Effectively using LEA is equivalent to using pointers in languages such as C, as such it is a powerful instruction.

share|improve this answer
I think this answer is confusing at best. "The LEA instruction is a 'Load Effective Address' which is an indirected instruction, which means that TABLE-ADDR points to a memory location at which the address to load is found." Actually LEA will load the address, not the contents of the address. I think actually the questioner needs to be reassured that MOV and LEA can overlap, and do exactly the same thing, in some circumstances –  Bill Forster Nov 9 '09 at 8:52
add comment

Your Answer


