8-Bit Arithmetic And Logical Group

__________________________________________________________________________________________________________________________
Mnemonic        Symbolic            Flags (bit 7-0)   Instruction         Number      Number of   Number of   Comments
                operation           S Z . H . V N C   opcode              of bytes    M cycles    T states
__________________________________________________________________________________________________________________________

ADD A,r         A <- A+r            ? ? X ? X V 0 ?   10 000 <r>          1           1           4           r:
ADD A,n         A <- A+n            ? ? X ? X V 0 ?   11 000 110          2           2           7           000  C
                                                      -- <n> ---                                              001  B
ADD A,(HL)      A <- A+(HL)         ? ? X ? X V 0 ?   10 000 110          1           2           7           010  E
                                                                                                              011  D
ADD A,(IX+d)    A <- A+(IX+d)       ? ? X ? X V 0 ?   11 011 101 (DDh)    3           5           19          100  L
ADD A,(IY+d)    A <- A+(IY+d)       ? ? X ? X V 0 ?   11 111 101 (FDh)    3           5           19          101  H
                                                      10 000 110                                              111  A
                                                      -- <d> ---

ADC A,s         A <- A+s+CY         ? ? X ? X V 0 ?   .. 001 ...          Please refer to ADD template
SUB s           A <- A-s            ? ? X ? X V 1 ?   .. 010 ...          Please refer to ADD template
SBC A,s         A <- A-s-CY         ? ? X ? X V 1 ?   .. 011 ...          Please refer to ADD template
AND s           A <- A AND s        ? ? X 1 X P 0 0   .. 100 ...          Please refer to ADD template
XOR s           A <- A XOR s        ? ? X 0 X P 0 0   .. 101 ...          Please refer to ADD template
OR s            A <- A OR s         ? ? X 0 X P 0 0   .. 110 ...          Please refer to ADD template
CP s            A - s               ? ? X ? X V 1 ?   .. 111 ...          Please refer to ADD template

INC r           r <- r+1            ? ? X ? X V 0 *   00 <r> 100          1           1           4
INC (HL)        (HL) <- (HL)+1      ? ? X ? X V 0 *   00 110 100          1           3           11
INC (IX+d)      (IX+d) <- (IX+d)+1  ? ? X ? X V 0 *   11 011 101 (DDh)    3           6           23
INC (IY+d)      (IY+d) <- (IY+d)+1  ? ? X ? X V 0 *   11 111 101 (FDh)    3           6           23
                                                      00 110 100
                                                      -- <d> ---

DEC m           m <- m-1            ? ? X ? X V 1 *   .. ... 101          Please refer to INC template


Please note:

The V symbol i the flags column for the P/V flag identifies whether an overflow occurred by the operation. The P symbol in the P/V flag identifies parity. V = 1 means overflow, V = 0 means no overflow. P = 1 means the parity of the result is even. P = 0 means that the parity of the result is odd.