AGB Programming Manual
Interrupt Control
©1999 - 2001 Nintendo of America Inc.
158
D.C.N. AGB-06-0001-002B4
3) Interrupt Request Register
When an interrupt request signal is generated from each hardware device, the
corresponding interrupt request flag is set in the IF Register.
15
14
13
12 11
10
09 08
07
06 05
04
03 02
01
00
IF
202h
0000h
R
Address
Register
Attributes Initial Value
V Counter Matching
V
H
Rendering Blank
DMA
Key
Timer
0
Timer
1
Timer
2
Timer
3
D M A
0
D M A
1
D M A
2
D M A
3
Timer
Serial Communication/General Purpose
Communication/JOY Bus
Communication/UART Communication
Game Pak(DREQ/IREQ)
If a 1 is written to the bit which the interrupt request flag is set in, that interrupt request
flag can be reset
[Cautions regarding clearing IME and IE]
A corresponding interrupt could occur even while a command to clear IME or each flag
of the IE register is being executed.
When clearing a flag of IE, you need to clear IME in advance so that mismatching of
interrupt checks will not occur.
When multiple interrupts are used
When the timing of clearing of IME and the timing of an interrupt agree, multiple
interrupts will not occur during that interrupt. Therefore, set (enable) IME after saving
IME during the interrupt routine.