Nintendo NES-001 User Guide - Page 41
E.4 Indexed Absolute, E.5 Indirect
View all Nintendo NES-001 manuals
Add to My Manuals
Save this manual to your list of manuals |
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