The 7 Addressing Modes
Walks through each MSP430 addressing mode on its own line: register, indexed, symbolic, absolute, immediate, indirect and indirect autoincrement. R6 receives the value of each effective address in turn.
What to watch as you step
- Register (Rn): the operand is the register itself
- Indexed (offset(Rn)): EA = Rn + offset
- Symbolic (label): EA = PC + offset, resolved at link time
- Absolute (&addr): EA is the literal address
- Immediate (#value): the operand is the literal value
- Indirect (@Rn): EA = contents of Rn
- Indirect autoincrement (@Rn+): EA = Rn, then Rn += 1 (.B) or 2 (.W)