Control and Status Flags
Individual bits can be set by programmers to control the CPU's operation.
Status flags. The status flags reflect the outcomes of arithmetic and logical operations performed by the CPU.
| Flag |
Description |
Overflow (O/OF) |
Flag is set wen the result of a signed arithmetic operation is too wide to fit into the destination. |
Direction (D) |
Affects block data transfer instructions such as MOVS, CMPS, and SCAS. |
Interrupt (I) |
Indicates whether or not system interrupts can occur. |
Sign (SF/S) |
Flag is set when the result of an arithmetic or logical operation generates a negative result. |
Zero (ZF/Z) |
Flag is set when the result of an arithmetic or logical operation generates a result of zero. |
Auxiliary Carry (A) |
Flag is set when an arithmetic operation causes a carry from bit 3 to bit 4 in an 8-bit operand. |
Parity (P) |
Flag sums the number of bits that are set in a number, and indicates whether the sum is odd or even. |
Carry (CF/C) |
Flag is set when the result of an unsigned arithmetic operation is too large to fit into the destination. |
| Flag |
O
| D
| I
| S
| Z
| A
| P
| C
|
| Result |
|
|
|
|
|
|
|
|
|
|
| Result |
Description |
| 1 |
Set the flag. |
| 0 |
Clear the flag. |
| ? |
May change the flag to an undetermined value. |
| |
The flag is not changed. |
| * |
Changes the flag according to specific rules associated with the flag. |
|