2.1 Interrupts


Note: Use disable_interrupts() before setting new interrupts.

void enable_interrupts();
enable_interrupts() sets the interrupts to active. Using this allows routines
set for interrupts to be called.

void disable_interrupts();
disable_interrupts() disables the interrupts. Many routines use disabled interrupts to
perform their tasks.

void add_VBL(int_handler h);
While interrupts are disabled, add_VBL(h) allows routines to be run when the
vblank interrupt flag is called. h is the routine to perform.

void add_LCD(int_handler h);
While interrupts are disabled, add_VBL(h) allows routines to be run when the
lcd interrupt flag is called. h is the routine to perform.

void add_TIM(int_handler h);
While interrupts are disabled, add_VBL(h) allows routines to be run when the
timer interrupt flag is called. h is the routine to perform.

void add_SIO(int_handler h);
While interrupts are disabled, add_VBL(h) allows routines to be run when the
serial input/output interrupt flag is called. h is the routine to perform.

void add_JOY(int_handler h);
While interrupts are disabled, add_VBL(h) allows routines to be run when the
joystick interrupt flag is called. h is the routine to perform.

set_interrupts(UBYTE flags);
Interrupt-Flags
VBL_IFLAG
LCD_IFLAG
TIM_IFLAG
SIO_IFLAG
JOY_IFLAG
set_interrupts(flags) specifies which interrupts to call.
* Note : (Use "|" to combine them)
* Mote : VBL_IFLAG should always be set.