The Western Design Center
3
Power-On Status: 6502 Emulation Mode..................................................................................................45The Full-Featured 65x Processor: The 65816 in Native Mode................................................................45
The Program Bank Register
.................................................................................................................................47
The Data Bank Register
........................................................................................................................................48
The Direct Page Register
......................................................................................................................................48
The Stack Pointer
..................................................................................................................................................48
Accumulator and Index Registers
........................................................................................................................48
Switching Registers Between Eight and Sixteen Bits
............................................................................................50
The Status Register
...............................................................................................................................................50
6502/65C02 Addressing Modes on the 65816
........................................................................................................51
New 65816 Addressing Modes
..............................................................................................................................52
Instructions
...........................................................................................................................................................54
Interrupts
..............................................................................................................................................................55
The 65802 Native Mode.............................................................................................................................55
Emulation Mode
....................................................................................................................................................58
Emulation Mode Registers
....................................................................................................................................60
Switching Between 6502 Emulation and Native Modes............................................................................61
Switching from Emulation to Native Mode
..........................................................................................................61
Switching from Native to Emulation Mode
..........................................................................................................61
65802/65816 Bugs and Quirks...................................................................................................................62
5)Chapter Five..........................................................................................................64
SEP, REP, and Other Details....................................................................................................................64
The Assembler Used in This Book
........................................................................................................................66
Address Notation
...................................................................................................................................................68
6)Chapter Six............................................................................................................69
First Examples: Moving Data....................................................................................................................69
Loading and Storing Registers
.............................................................................................................................71Effect of Load and Store Operations on Status Flags............................................................................................73Moving Data Using the Stack..............................................................................................................................73Push....................................................................................................................................................................74Pushing the Basic 65x Registers..........................................................................................................................76Pull.....................................................................................................................................................................76Pulling the Basic 65x Registers...........................................................................................................................76Pushing and Pulling the 65816’s Additional Registers..........................................................................................78Pushing Effective Addresses................................................................................................................................79Other Attributes of Push and Pull........................................................................................................................79
Moving Data Between Registers
...........................................................................................................................79Transfers.............................................................................................................................................................79Exchanges...........................................................................................................................................................86
Storing Zero to Memory
.......................................................................................................................................86
Block Moves
..........................................................................................................................................................87
7)Chapter Seven.......................................................................................................89
SimpleAddressing Modes..........................................................................................................................89
Immediate Addressing
..........................................................................................................................................90
Absolute Addressing
.............................................................................................................................................92
Direct Page Addressing
.........................................................................................................................................94
Indexing
.................................................................................................................................................................95
Absolute Indexed with X and Absolute Indexed with Y Addressing
...................................................................98
Direct Page Indexed with X and Direct Page Indexed with Y Addressing
........................................................101
Accumulator Addressing
....................................................................................................................................103
Implied Addressing
.............................................................................................................................................103
Stack
....................................................................................................................................................................104
Direct Page Indirect Addressing
.........................................................................................................................104
Absolute Long Addressing
..................................................................................................................................105