ADC A,reg_{8}
Operation  reg_{8} and the carry flag are added to A.  

Op Code  10001[reg_{8}]
 
Flags  S Z H C are affected as defined P/V detects overflow N is reset 

T States  4 or 7 (HL) 
ADC A,imm_{8}
Operation  The immediate value and the carry flag are added to A. 

Op Code  11001110 : [imm_{8}] 
Flags  S Z H C are affected as defined P/V detects overflow N is reset 
T States  7 
ADC A,(reg_{index} + ofs_{8})
Operation  The value pointed to by index register reg_{index} plus ofs_{8}, and the carry flag, are added to A.  

Op Code  [reg_{index}] : 10001110 : [ofs_{8}]


Flags  S Z H C are affected as defined P/V detects overflow N is reset 

T States  19 
ADC HL,reg_{16}
Operation  The value of reg_{16} and the carry flag are added to HL.  

Op Code  11101101 : 01[reg_{16}]1010


Flags  S Z C are affected as defined P/V detects overflow H is set if there is a carry out of bit 11 N is reset 

T States  15 
ADD A,reg_{8}
Operation  Adds reg_{8} to A.  

Op Code  10000[reg_{8}]


Flags  S Z H C are affected as defined P/V detects overflow N is cleared 

T States  4 or 7 (HL) 
ADD A,imm_{8}
Operation  The immediate value is added to A. 

Op Code  11000110 : [imm_{8}] 
Flags  S Z H C are affected as defined P/V detects overflow N is cleared 
T States  7 
ADD A,(reg_{index} + ofs_{8})
Operation  Adds the value of the memory location pointed to by reg_{index} plus ofs_{8} to A.  

Op Code  [reg_{index}] : 10000110 : [ofs_{8}]


Flags  S Z H C are affected as defined P/V detects overflow N is cleared 

T States  19 
ADD HL,reg_{16}
Operation  The value of reg_{16} is added to HL.  

Op Code  00[reg_{16}]1001


Flags  S Z P/V are unaffected C is affected as defined H is set if there is a carry out of bit 11 N is reset 

T States  11 
ADD IX,reg_{16}
Operation  The value of reg_{16} is added to IX.  

Op Code  11011101 : 00[reg_{16}]1001


Flags  S Z P/V are unaffected C is affected as defined H is set if there is a carry out of bit 11 N is reset 

T States  15 
ADD IY,reg_{16}
Operation  The value of reg_{16} is added to IY.  

Op Code  11111101 : 00[reg_{16}]1001


Flags  S Z P/V are unaffected C is affected as defined H is set if there is a carry out of bit 11 N is reset 

T States  15 
CP reg_{8}
Operation  Subtracts reg_{8} from A and affects flags according to the result. A is not modified.  

Op Code  10111[reg_{8}]


Flags  S Z H C are affected as defined P/V detects overflow N is set 

T States  4 or 7 (HL) 
CP imm_{8}
Operation  Subtracts the immediate value from A and affects flags according to the result. A is not modified. 

Op Code  11111110 : [imm_{8}] 
Flags  S Z H C are affected as defined P/V detects overflow N is set 
T States  7 
CP (reg_{index} + ofs_{8})
Operation  Subtracts the memory value pointed to by reg_{index} plus ofs_{8} from A and affects the flags according to the result. A is not modified.  

Op Code  [reg_{index}] : 10111110 : [ofs_{8}]


Flags  S Z H C are affected as defined P/V detects overflow N is set 

T States  19 
CPD
Operation  Compares the value of the memory location pointed to by HL with A. HL and BC are then decremented. 

Op Code  11101101 : 10101001 
Flags  S Z H are affected as defined P/V is reset if BC becomes zero N is set C is unaffected 
T States  16 
CPDR
Operation  Compares the value of the memory location pointed to by HL with A. HL and BC are then decremented. If BC is not zero and Z is not set, this operation is repeated. Interrupts can trigger while this instruction is processing. 

Op Code  11101101 : 10111001 
Flags  S Z H are affected as defined P/V is reset if BC becomes zero N is set C is unaffected 
T States  If BC != 0 and Z is reset: 21 If BC == 0 or Z is set: 16 
CPI
Operation  Compares the value of the memory location pointed to by HL with A. HL is incremented and BC is decremented. 

Op Code  11101101 : 10100001 
Flags  S Z H are affected as defined P/V is reset if BC becomes zero N is set C is unaffected 
T States  16 
CPIR
Operation  Compares the value of the memory location pointed to by HL with A. HL is incremented and BC is decremented. If BC is not zero and Z is not set, this operation is repeated. Interrupts can trigger while this instruction is processing. 

Op Code  11101101 : 10110001 
Flags  S Z H are affected as defined P/V is reset if BC becomes zero N is set C is unaffected 
T States  If BC != 0 and Z is reset: 21 If BC == 0 or Z is set: 16 
CPL
Operation  The contents of A are inverted (one's complement). 

Op Code  00101111 
Flags  S Z P/V C are not affected H N are set 
T States  4 
Operation  Adjusts A for BCD addition and subtraction operations.



Op Code  00100111  
Flags  S Z are affected as defined P/V is parity N is unaffected See instruction for H C 

T States  4 
DEC reg_{8}
Operation  Subtracts one from reg_{8}.  

Op Code  00[reg_{8}]101


Flags  S Z H are affected as defined P/V is set if operand was $80 before operation N is set C is unaffected 

T States  4 or 11 (HL) 
DEC (reg_{index} + ofs_{8})
Operation  Subtracts one from the memory location pointed to by reg_{index} plus ofs_{8}.  

Op Code  [reg_{index}] : 00110101 : [ofs_{8}]


Flags  S Z H are affected as defined P/V is set is operand was $80 before operation N is set C is unaffected 

T States  23 
DEC reg_{16}
Operation  Subtracts one from reg_{16}.  

Op Code  00[reg_{16}]1011


T States  6 
DEC reg_{index}
Operation  Subtracts one from reg_{index}.  

Op Code  [reg_{index}] : 00101011


T States  10 
INC reg_{8}
Operation  Adds one to reg_{8}.  

Op Code  00[reg_{8}]100


Flags  S Z H are affected as defined P/V is set is operand was $7F before operation C is unaffected 

T States  4 or 11 (HL) 
INC (reg_{index} + ofs_{8})
Operation  Adds one to the memory location pointed to by reg_{index} plus ofs_{8}.  

Op Code  [reg_{index}] : 00110100 : [ofs_{8}]


Flags  S Z H are affected as defined P/V is set is operand was $7F before operation C is unaffected 

T States  23 
INC reg_{16}
Operation  Adds one to reg_{16}.  

Op Code  00[reg_{16}]0011


T States  6 
INC reg_{index}
Operation  Adds one to reg_{index}.  

Op Code  [reg_{index}] : 00100011


T States  10 
NEG
Operation  The contents of A are negated (two's complement). Operation is the same as subtracting A from zero. 

Op Code  11101101 : 01000100 
Flags  S Z H are affected as defined P/V is set if A was $80 before operation N is set C is set if A was not $00 before operation 
T States  8 
SBC A,reg_{8}
Operation  Subtracts reg_{8} and the carry flag from A.  

Op Code  10011[reg_{8}]


Flags  S Z H C are affected as defined P/V detects overflow N is set 

T States  4 or 7 (HL) 
SBC A,imm_{8}
Operation  Subtracts the immediate value and the carry flag from A. 

Op Code  11011110 : [imm_{8}] 
Flags  S Z H C are affected as defined P/V detects overflow N is set 
T States  7 
SBC A,(reg_{index} + ofs_{8})
Operation  Subtracts the value at the memory location pointed to by reg_{index} plus ofs_{8}, and the carry flag from A  

Op Code  [reg_{16}] : 10011110 : [ofs_{8}]


Flags  S Z H C are affected as defined P/V detects overflow N is set 

T States  19 
SBC HL,reg_{16}
Operation  Subtracts reg_{16} and the carry flag from HL.  

Op Code  11101101 : 01[reg_{16}]0010


Flags  S Z C are affected as defined H is set if a borrow from bit 12 P/V detects overflow N is set 

T States  15 
SUB A,reg_{8}
Operation  Subtracts reg_{8} from A.  

Op Code  10010[reg_{8}]


Flags  S Z H C are affected as defined P/V detects overflow N is set 

T States  4 or 7 (HL) 
SUB A,imm_{8}
Operation  Subtracts the immediate value from A. 

Op Code  11010110 : [imm_{8}] 
Flags  S Z H C are affected as defined P/V detects overflow N is set 
T States  7 
SUB A,(reg_{index} + ofs_{8})
Operation  Subtracts the value at the memory location pointed to by reg_{index} plus ofs_{8} from A  

Op Code  [reg_{16}] : 10010110 : [ofs_{8}]


Flags  S Z H C are affected as defined P/V detects overflow N is set 

T States  19 