# `lea`

[M68K Documentation](https://asm-editor.specy.app/documentation/m68k.md) › [Instructions](https://asm-editor.specy.app/documentation/m68k/instruction.md)

Web page: https://asm-editor.specy.app/documentation/m68k/instruction/lea

**Load effective address**

Category: Data movement

Computes the effective address of the first operand and stores it in an address register.

Size .l

Used in: [trap #15 and its tasks](https://asm-editor.specy.app/learn/courses/m68k/talking-to-the-outside-world/trap-15-and-its-tasks.md) (M68K assembly), [Exceptions and the vector table](https://asm-editor.specy.app/learn/courses/m68k/talking-to-the-outside-world/exceptions-and-the-vector-table.md) (M68K assembly), [Interrupts and cycles](https://asm-editor.specy.app/learn/courses/m68k/talking-to-the-outside-world/interrupts-and-cycles.md) (M68K assembly), [Fill an array with the numbers from 1 to 10](https://asm-editor.specy.app/learn/courses/m68k/examples/counting-loop.md) (M68K assembly), [Sum of an array](https://asm-editor.specy.app/learn/courses/m68k/examples/sum-of-an-array.md) (M68K assembly), [The largest element](https://asm-editor.specy.app/learn/courses/m68k/examples/max-of-an-array.md) (M68K assembly), [Length of a string](https://asm-editor.specy.app/learn/courses/m68k/examples/string-length.md) (M68K assembly), [Reverse a string in place](https://asm-editor.specy.app/learn/courses/m68k/examples/reverse-a-string.md) (M68K assembly), [Bubble sort](https://asm-editor.specy.app/learn/courses/m68k/examples/bubble-sort.md) (M68K assembly), [A jump table](https://asm-editor.specy.app/learn/courses/m68k/examples/jump-table.md) (M68K assembly)

## Flags

| Flag | Effect |
| --- | --- |
| X | not changed |
| N | not changed |
| Z | not changed |
| V | not changed |
| C | not changed |

## Forms

- `lea <ea>, An`
  - Source: (An), d(An), d(An,Xn), abs, d(PC), d(PC,Xn) (control)

## Operands

- [`<ea>`](https://asm-editor.specy.app/documentation/m68k/addressing-mode.md): 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 allowed `d(An,Xn)` or `d(PC,Xn)` mode also permits the corresponding 68020 indexed and memory indirect forms. See [68020 addressing](https://asm-editor.specy.app/documentation/m68k/addressing-mode/68020.md).
- [`An`](https://asm-editor.specy.app/documentation/m68k/addressing-mode/direct.md): An address register, `a0` to `a7`; `sp` is another name for `a7`.

## Description

`lea 4(a0), a1` sets `a1` to `a0 + 4`. It does not read the data at the resulting address. A 68020 [memory indirect operand](https://asm-editor.specy.app/documentation/m68k/addressing-mode/memory-indirect.md) does read a pointer while computing that address: `lea ([a0]), a1` loads the long pointer stored at `a0`.

## Example

```m68k
org $2000
someLabel: dc.l 0

START:
lea someLabel, a0
lea (a0), a1
lea $3000, a2
```
