../images/terug.gif

6502 STATUS FLAGS



The 6502 status register contains 8 bits, each one with a different meaning. These bits are altered and accessed by various instructions in order to describe the current state of processing.

7 6 5 4 3 2 1 0
N V   B D I Z C
  • C: CARRY - Is the "carry" of addition, or "borrow" of subtraction. The rotation commands also use it.
  • Z: ZERO - Returns 1 if the result of the operation was zero.
  • I: IRQ DISABLE - Used to turn off interrupt requests.
  • D: DECIMAL MODE - Used to activate the decimal mode.
  • B: BREAK - Activated when a forced interrupt (BRK) occurs.
  • V: OVERFLOW - Returns 1 if the addition of two numbers of equal signals or the subtraction of two numbers with different signs returns a result greater than +127 or lower than -128.
  • N: NEGATIVE - Activated if the signal bit of the accumulador (bit 7) is 1.

The fifth bit was not implemented.