Nintendo NES-001 User Guide - Page 41

E.4 Indexed Absolute, E.5 Indirect

Page 41 highlights

E.4 Indexed Absolute Indexed absolute addressing takes two operands, forming a 16-bit address, least significant byte first, and adds the value of a register to it to give the address where the data can be found. For example, if the operands are bb and cc, the address of the data will be ccbb + X. There are two forms of indexed absolute addressing: • Absolute, X - Add contents of X register to operand. An example of this addressing mode is AND $1234.X. • Absolute, Y - Add contents of Y register to operand. An example of this addressing mode is AND $1234.Y. Figure E-4. Indexed absolute addressing. E.5 Indirect Indirect addressing takes two operands, forming a 16-bit address, which identifies the least significant byte of another address which is where the data can be found. For example if the operands are bb and cc, and ccbb contains xx and ccbb + 1 contains yy, then the real target address is yyxx. On the 6502, only JMP (Jump) uses this addressing mode and an example is JMP ($1234). The diagram shows the general form of indirect addressing. However, with the JMP instruction, instead of yyxx pointing to the data and the program counter being increased by three, the program counter is set to yyxx and execution resumes from that address. 41

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47

41
E.4 Indexed Absolute
Indexed absolute addressing takes two operands, forming a 16-bit address, least significant
byte first, and adds the value of a register to it to give the address where the data can be
found. For example, if the operands are bb and cc, the address of the data will be ccbb + X.
There are two forms of indexed absolute addressing:
Absolute, X - Add contents of X register to operand. An example of this addressing mode
is AND $1234.X.
Absolute, Y - Add contents of Y register to operand. An example of this addressing mode
is AND $1234.Y.
Figure E-4. Indexed absolute addressing.
E.5 Indirect
Indirect addressing takes two operands, forming a 16-bit address, which identifies the least
significant byte of another address which is where the data can be found. For example if the
operands are bb and cc, and ccbb contains xx and ccbb + 1 contains yy, then the real target
address is yyxx. On the 6502, only JMP (Jump) uses this addressing mode and an example
is JMP ($1234). The diagram shows the general form of indirect addressing. However, with
the JMP instruction, instead of yyxx pointing to the data and the program counter being
increased by three, the program counter is set to yyxx and execution resumes from that
address.