Nintendo DMG-01 Manual - Page 87
Nintendo DMG-01 - Game Boy Console Manual
View all Nintendo DMG-01 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 87 highlights
Game BoyTM CPU Manual 3.3.3. 8-Bit ALU 8. CP n Description: Compare A with n. This is basically an A - n subtraction instruction but the results are thrown away. Use with: n = A,B,C,D,E,H,L,(HL),# Flags affected: Z - Set if result is zero. (Set if A = n.) N - Set. H - Set if no borrow from bit 4. C - Set for no borrow. (Set if A < n.) Opcodes: Instruction CP CP CP CP CP CP CP CP CP Parameters A B C D E H L (HL) # Opcode BF B8 B9 BA BB BC BD BE FE Cycles 4 4 4 4 4 4 4 8 8 by DP Page 87
Game Boy
TM
CPU Manual
3.3.3. 8-Bit ALU
8.
CP n
Description:
Compare A with n. This is basically an A - n
subtraction instruction but the results are thrown
away.
Use with:
n = A,B,C,D,E,H,L,(HL),#
Flags affected:
Z - Set if result is zero. (Set if A = n.)
N - Set.
H - Set if no borrow from bit 4.
C - Set for no borrow. (Set if A < n.)
Opcodes:
Instruction
Parameters
Opcode
Cycles
CP
A
BF
4
CP
B
B8
4
CP
C
B9
4
CP
D
BA
4
CP
E
BB
4
CP
H
BC
4
CP
L
BD
4
CP
(HL)
BE
8
CP
#
FE
8
by DP
Page 87