The Western Design Center 65C02 is a slightly upgraded version of the popular and venerable 6502 microprocessor. The 65C02 shared its predecessor's 8-bit instruction set architecture and 16-bit memory addressing.
The 65C02 added a small number of documented opcodes and, significantly, fixed the irksome 'indirect jump page wrap bug' that caused fits for so many budding assembly language programmers.
Another problem with the 6502, fixed in the 65C02, relates to its program status register, which contains eight system flags. Some flags are set or reset under program control. Others reflect the status of the machine after mathematical instructions:
- N Negative sign flag
- V Overflow flag
- 1 Always 1
- B Break flag, set by the BRK instruction
- D Decimal mode flag
- I IRQ disable flag
- Z Zero flag
- C Carry Flag
In the 6502 the decimal flag (D) was not initialised during a reset. This meant it would be in an unpredictable state after a reset, and could lead to arbitrary behaviour. This forced programmers to use CLD instructions after resets on all 6502 programs.
Notable uses of the 65C02