Nintendo DMG-01 Manual - Page 62
Flag Register
View all Nintendo DMG-01 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 62 highlights
3.2.1. Generally Game BoyTM CPU Manual programmer and is used to store the results of various math operations. The PC, or Program Counter, register points to the next instruction to be executed in the Game Boy memory. The SP, or Stack Pointer, register points to the current stack position. 3.2.2. Flag Register The Fleg Register consists of the following bits: 76543210 ZNHC0000 • Zero Flag (Z): This bit is set when the result of a math operation is zero or two values match when using the CP instruction. • Subtract Flag (N): This bit is set if a subtraction was performed in the last math instruction. • Half Carry Flag (H): This bit is set if a carry occurred from the lower nibble in the last math operation. • Carry Flag (C): This bit is set if a carry occurred from the last math operation or if register A is the smaller value when executing the CP instruction. Page 62 V 1.01