An addressing mode refers to the way the CPU obtains information from memory. Here's a simple list:
Instructions like ASL, INX, or DEY do not affect any address in memory. No operand is required.
ASL INX DEY
There is an odd instruction in this category though. The NOP instruction does nothing- no registers are changed.
The operand of an immediate instruction is only one byte, and denotes a constant value.
LDA #$06 ORA #$9A AND #$7F
The operand of an absolute instruction is two bytes, and denotes an address in memory.
LDA $1234 STA $4321 JMP $C000
The operand of a zeropage instruction is one byte, and denotes an address in the zero page ($00xx).
LDA $FB STA $FE CMP $FD
If an operand is indexed, then whatever index is specified is added to the address to get the real address.
LDA $1234,X <- load A from $1234+the value in X STA $4321,Y <- store A to $4321+the value in Y LDA $FB,X <- load A from $00FB+the value in X
There is a bug regarding indexing from zeropage- say our X value is 4. We try LDA $FE,X. Instead of loading from $0102, the counter will roll over and load from $0002 instead.
The operand of an indirect address points to an address where the actual two-byte address is held. If we had the value $C000 in $1234, ($1234) would load the two-byte value from $1234 ($C000) as the real operand.
This mode points to an address in zeropage. Let's go through what it does-
Say that at $FB, we have the value $2000 and we try:
So, the CPU reads what address is at $FB- in our case, $2000. Then it adds the index to that value to get the real operand.
This mode again points to an address in zeropage.
Say that at $F0, we had $2000, $3000, then $4000 and we try:
The CPU reads what address is at $F0+whatever is in X. If X was 0, it'd get $2000. If 2, it'd get $3000. If 4, it'd get $4000.