Specifications

740 Family
Programming Guide <C Language>
REJ05B0468-0100Z /Rev.1.00 September 2004 Page 98 of 102
2.5.3 Setting the Interrupt Disable Flag (I Flag)
Setting the interrupt disable flag (I flag)
For interrupts to be generated, the interrupt disable flag (I flag) must be cleared to 0 (enabled).
The ICC740 allows the I flag to be set by an inline function. To use inline functions, make sure
“intr740.h” is included.
In the above example, enable_interrupt() and disable_interrupt() are replaced with the CLI
instruction to clear the I flag to 0 and the SEI instruction to set the I flag to 1, respectively.
#include <intr740.h>
void main( void )
{
enable_interrupt() ;
while( 1 ) ;
disable_interrupt() ;
}
main:
CLI
?0003:
BRA ?0003
SEI
RTS
Expanded
image
enable_interrupt()
disable_interrupt()