Mnemonic |
Symbolic Operation |
Flags | OP-Code | No. of Bytes |
No. of M Cycles |
No. of T Cycles |
Comments | |||||
C | Z | P/V | S | N | H | 76 543 210 | ||||||
DAA | Converts acc. content into packed BCD following add or subtract with packed BCD operands |
↕ | ↕ | P | ↕ | • | ↕ | 00 100 111 | 1 | 1 | 4 |
Decimal adjust accumulator |
CPL |
A ← ¬ A | • | • | • | • | 1 | 1 | 00 100 111 | 1 | 1 | 4 |
Complement accumulator (one's complement) |
NEG |
A ← A0 - A | ↕ | ↕ | V | ↕ | 1 | ↕ |
11 101 101 01 000 100 |
2 | 2 | 8 |
Negate acc. (two's complement) |
CCF |
CY ← ¬ CY | ↕ | • | • | • | 0 | X | 00 111 111 | 1 | 1 | 4 |
Complement carry flag |
SCF | CY ← 1 | 1 | • | • | • | 0 | 0 | 00 110 111 | 1 | 1 | 4 | Set carry flag |
NOP | No operation | • | • | • | • | • | • | 00 000 000 | 1 | 1 | 4 | |
HALT | CPU halted | • | • | • | • | • | • | 01 110 110 | 1 | 1 | 4 | |
DI | IFF ← 0 | • | • | • | • | • | • | 11 110 011 | 1 | 1 | 4 | |
EI | IFF ← 1 | • | • | • | • | • | • | 11 111 011 | 1 | 1 | 4 | |
IM0 | Set interrupt mode 0 |
• | • | • | • | • | • |
11 101 101 01 000 110 |
2 | 2 | 8 | |
IM1 | Set interrupt mode 1 |
• | • | • | • | • | • |
11 101 101 01 010 110 |
2 | 2 | 8 | |
IM2 | Set interrupt mode 2 |
• | • | • | • | • | • |
11 101 101 01 011 110 |
2 | 2 | 8 |
Notes: | IFF indicates the interrupt enable flip-flop. | |
CY indicates the carry flip-flop. | ||
¬ is used as bitwise NOT where Zilog used an overbar instead. | ||
Flag Notation: | • = flag not affected, 0 = flag reset, 1 = flag set, X = flag is unknown, | |
↕ = flag is affected according to the result of the operation. | ||