previous | start | next

The IA32 leal instruction

leal is the Load Effective Address instruction.

The first operand should be a memory location and the second operand should be a register.

However, in contrast to movl and addl, leal moves that memory address to the destination register.

 leal -4(%ebp), %eax

 ; calculate the address -4(%ebp) and
 ; store that address in register %eax
   

Compare this with movl:

 movl -4(%ebp), %eax

 ; calculate the address -4(%ebp) and
 ; store the contents of
 ; that address in register %eax
   


previous | start | next