The 6502 cpu
contains a status register and each individual bit is a FLAG.
A flag indicates the result of the previous operation. N result is negative
The flags are tested by the cpu and, depending on their state, determine which part of the program the cpu will jump to. This is how computers are able to make decisions. |