lea
Load effective address
Computes the effective address of the first operand and stores it in an address register.
Size .l
Used in
- trap #15 and its tasksM68K assembly
- Exceptions and the vector tableM68K assembly
- Interrupts and cyclesM68K assembly
- Fill an array with the numbers from 1 to 10M68K assembly
- Sum of an arrayM68K assembly
- The largest elementM68K assembly
- Length of a stringM68K assembly
- Reverse a string in placeM68K assembly
- Bubble sortM68K assembly
- A jump tableM68K assembly
XNZVC –––––
- Leaves every flag unchanged
Forms
Operands
<ea>- An operand using one of the addressing modes listed for this form. The list determines whether it can be a register, memory or an immediate value. With
opt p=68020, an allowedd(An,Xn)ord(PC,Xn)mode also permits the corresponding 68020 indexed and memory indirect forms. See 68020 addressing. More An- An address register,
a0toa7;spis another name fora7. More
lea 4(a0), a1 sets a1 to a0 + 4. It does not read the data at the resulting address. A 68020 memory indirect operand does read a pointer while computing that address: lea ([a0]), a1 loads the long pointer stored at a0.
org $2000
someLabel: dc.l 0
START:
lea someLabel, a0
lea (a0), a1
lea $3000, a2