Description

The LEA instruction calculates the effective address (offset part) and stores it in the specified register. The operand-size attribute of the instruction (represented by OperandSize in the algorithm under "Operation" above) is determined by the chosen register. The address-size attribute (represented by AddressSize) is determined by the attribute of the code segment. (See Operand-Size and Address-Size Attributes.) The address-size and operand-size attributes affect the action performed by the LEA instruction, as follows:

┌────────┬────────┬────────────────────────────────────────┐
│OPERAND │ADDRESS │ACTION PERFORMED                        │
│SIZE    │SIZE    │                                        │
├────────┼────────┼────────────────────────────────────────┤
│  16    │  16    │16-bit effective address is calculated  │
│        │        │and stored in requested 16-bit register │
│        │        │destination.                            │
├────────┼────────┼────────────────────────────────────────┤
│  16    │  32    │32-bit effective address is calculated. │
│        │        │The lower 16-bits of the address are    │
│        │        │stored in the requested 16-bit register │
│        │        │destination.                            │
├────────┼────────┼────────────────────────────────────────┤
│  32    │  16    │16-bit effective address is calculated. │
│        │        │The 16-bit address is zero-extended and │
│        │        │stored in the requested 32-bit register │
│        │        │destination.                            │
├────────┼────────┼────────────────────────────────────────┤
│  32    │  32    │32-bit effective address is calculated  │
│        │        │and stored in the requested 32-bit      │
│        │        │register destination.                   │
└────────┴────────┴────────────────────────────────────────┘


[Back: Details Table]
[Next: Operation]