Nintendo NES-001 User Guide - Page 39
Appendix E, Addressing Modes
View all Nintendo NES-001 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 39 highlights
Appendix E 6502 Addressing Modes E.1 Zero Page Zero page addressing uses a single operand which serves as a pointer to an address in zero page ($0000-$00FF) where the data to be operated on can be found. By using zero page addressing, only one byte is needed for the operand, so the instruction is shorter and, therefore, faster to execute than with addressing modes which take two operands. An example of a zero page instruction is AND $12. Figure E-1. Zero page addressing. E.2 Indexed Zero Page Indexed zero page addressing takes a single operand and adds the value of a register to it to give an address in zero page ($0000-$00FF) where the data can be found. There are two forms of indexed zero page addressing: • Zero Page, X - Add contents of X register to operand. This is the most common form of indexed zero page. An example of this addressing mode is AND $12,X. • Zero Page, Y - Add contents of Y register to operand. This mode can only be used with LDX (Load X Register) and STX (Store X Register). An example of this addressing mode is LDX $12,Y. Wraparound is used when performing the addition so the address of the data will always be in zero page. For example, if the operand is $FF and the X register contains $01 the address of the data will be $0000, not $0100. 39