Nintendo GAME BOY Programming Manual page 123

Hide thumbs Also See for GAME BOY:
Table of Contents

Advertisement

CCF
Flips the carry flag CY.
Example: When CY = 1,
; CY ← 0
CCF
SCF
Sets the carry flag CY.
DI
Resets the interrupt master enable flag and prohibits maskable interrupts.
Note:
Even if a DI instruction is executed in an interrupt routine, the IME flag is
set if a return is performed with a RETI instruction.
EI
Sets the interrupt master enable flag and enables maskable interrupts.
This instruction can be used in an interrupt routine to enable higher-order interrupts.
Note:
The IME flag is reset immediately after an interrupt occurs. The IME flag
reset remains in effect if control is returned from the interrupt routine by
a RET instruction. However, if an EI instruction is executed in the
interrupt routine, control is returned with IME = 1.
CY ← (CY)
CY ← 1
IME ← 0
IME ← 1
123
Chapter 4: CPU Instruction Set
CY
H
N
Z
CYCL
0
0
--
1
(CY)
CY
H
N
Z
CYCL
1
0
0
--
1
CY
H
N
Z
CYCL
--
--
--
--
1
CY
H
N
Z
CYCL
--
--
--
--
1
7 6
5 4 3
2 1 0
00
111
111
7 6
5 4 3
2 1 0
00
110
111
7 6
5 4 3
2 1 0
11
110
011
7 6
5 4 3
2 1 0
11
111
011

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents