# M68K Addressing modes

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

Web page: https://asm-editor.specy.app/documentation/m68k/addressing-mode

The ways an operand names a register, a value or a place in memory.

20 entries, each with its own page of markdown:

- [Effective addresses](https://asm-editor.specy.app/documentation/m68k/addressing-mode/overview.md) `<ea>`: stands for an operand using one of the instruction’s supported addressing modes.
- [Direct](https://asm-editor.specy.app/documentation/m68k/addressing-mode/direct.md) `Dn, An, Rn`: Names a register directly.
- [Indirect](https://asm-editor.specy.app/documentation/m68k/addressing-mode/indirect.md) `(An)`: Accesses memory at the address held in an address register.
- [Address-register displacement](https://asm-editor.specy.app/documentation/m68k/addressing-mode/address-register-displacement.md) `d(An)`: Accesses memory at the address register plus a displacement, written as d in d(An).
- [Indirect postincrement/predecrement](https://asm-editor.specy.app/documentation/m68k/addressing-mode/indirect-post-pre-increment.md) `(An)+, -(An)`: (An)+ accesses memory at the address in the register, then increases the register.
- [Immediate](https://asm-editor.specy.app/documentation/m68k/addressing-mode/immediate.md) `#imm, Im, #<num>`: Supplies a constant value after #.
- [Absolute memory address](https://asm-editor.specy.app/documentation/m68k/addressing-mode/effective-address.md) `abs, Ea/<label>`: Accesses memory at an address written as a number, label or expression.
- [Address-register indexed](https://asm-editor.specy.app/documentation/m68k/addressing-mode/address-register-indexed.md) `d(An,Xn)`: Accesses memory at the sum of an address register, an index register and an optional displacement.
- [Program-counter relative](https://asm-editor.specy.app/documentation/m68k/addressing-mode/program-counter-relative.md) `d(PC), d(PC,Xn)`: Write the target label or address before (pc), as in table(pc).
- [Status registers](https://asm-editor.specy.app/documentation/m68k/addressing-mode/status-registers.md) `sr, ccr`: sr is the 16-bit status register and ccr is its low condition-code byte.
- [User stack pointer](https://asm-editor.specy.app/documentation/m68k/addressing-mode/user-stack-pointer.md) `usp`: usp holds the user-mode stack pointer.
- [Control registers](https://asm-editor.specy.app/documentation/m68k/addressing-mode/control-registers.md) `Rc, vbr, sfc, dfc, msp, isp, cacr, caar`: The 68010 adds three control registers.
- [On the 68020](https://asm-editor.specy.app/documentation/m68k/addressing-mode/68020.md) `opt p=68020`: Select the 68020 with opt p=68020 before any code or data.
- [Scaled index](https://asm-editor.specy.app/documentation/m68k/addressing-mode/scaled-index.md) `(bd,An,Xn*k), (bd,PC,Xn*k)`: On the 68020, *2, *4 or *8 after an index register scales its contribution to the address.
- [Base displacements](https://asm-editor.specy.app/documentation/m68k/addressing-mode/base-displacements.md) `(bd.w,An,Xn), (bd.l,An,Xn)`: The 68020’s full addressing forms allow signed word or long base displacements.
- [Memory indirect](https://asm-editor.specy.app/documentation/m68k/addressing-mode/memory-indirect.md) `([bd,An],Xn,od), ([bd,An,Xn],od), ([bd,PC],Xn,od), ([bd,PC,Xn],od)`: On the 68020, square brackets request a pointer read.
- [Suppressed registers](https://asm-editor.specy.app/documentation/m68k/addressing-mode/suppressed-registers.md) `za0, zd0, zpc`: On the 68020, a z prefix suppresses a base or index register’s contribution to the address.
- [Long branches](https://asm-editor.specy.app/documentation/m68k/addressing-mode/long-branches.md) `bra.l label, bsr.l label, b<cc>.l label`: On the 68020, .l gives bra, bsr and bcc a signed 32-bit displacement, reaching anywhere in the editor’s memory.
- [Register pairs](https://asm-editor.specy.app/documentation/m68k/addressing-mode/register-pairs.md) `Dh:Dl, Dr:Dq, (Rn1):(Rn2), Dx:Dy, (Rx):(Ry)`: Some 68020 instructions use a pair of registers in one operand, separated by a colon.
- [Bit fields](https://asm-editor.specy.app/documentation/m68k/addressing-mode/bit-fields.md) `{offset:width}, opt bit`: A bit field is a run of 1 to 32 bits in a data register or in memory.
