Processor Status Register

From NES Hacker Wiki
Jump to: navigation, search

The Processor Status Register (P) is a 1 byte register with each bit representing a flag. These flags are used to indicate whether something has or has not occurred based on the result of an instruction.

As instructions are executed, they have the possibility of altering flags based on the opcode. These alterations can either Change, Ignore, Set, or Clear a flag.

Status Icon Description
Change Status-Change.png This flag will either be set or cleared based on the operand.
Ignore Status-Ignore.png This flag will not change.
Set Status-Set.png This flag will always be set to on, that is, have a value of 1.
Clear Status-Clear.png This flag will always be set to off, that is, have a value of 0.
Bit # Flag
7 N - Negative Flag
6 V - Overflow Flag
5 1 - Always 1 Flag
4 B - Break Flag
3 D - Decimal Flag
2 I - Interrupt Flag
1 Z - Zero Flag
0 C - Carry Flag