English
Language : 

CC78K0S Datasheet, PDF (349/520 Pages) NEC – C Compiler Ver.1.30 or Later Language
CHAPTER 11 EXTENDED FUNCTIONS
(10) Interrupt function qualifier (_ _interrupt)
Interrupt Function Qualifier
_ _interrupt
FUNCTION
• A function declared with the _ _interrupt qualifier is regarded as a hardware interrupt function, and execution
is returned by the return RETI instruction for the non-maskable/maskable interrupt function.
• A function declared with this qualifier is regarded as a (non-maskable/maskable) interrupt function, and saves
or restores the registers and variable areas (1) and (4) below, which are used as the work area of the
compiler, to or from the stack.
If a function call is described in this function, however, all the variable areas are saved to the stack.
(1) Registers
(2) saddr area for register variables
(3) saddr area for arguments/auto variables of norec function (regardless of whether used or not)
(4) saddr area for runtime library
Remark
If the -QR option is not specified (default) at compilation, save/restore codes are not output because
areas (2) and (3) are not used. If the -SM option is specified at compilation, save/restore codes are
not output because areas (2), (3) and (4) are not used.
EFFECT
• By declaring a function with this qualifier, the setting of a vector table and interrupt function definition can be
described in separate files.
USAGE
• Describe _ _interrupt as the qualifier of an interrupt function.
(For non-maskable/maskable interrupt function)
_ _interrupt void func() {processing}
RESTRICTIONS
• _ _interrupt_brk is not supported because there is no software interrupt. A warning message is output
where _ _interrupt_brk first appeared, the keyword is ignored, and _ _interrupt_brk is handled as a normal
function.
• The interrupt function cannot specify callt/noauto/norec/_ _callt/_ _leaf/_ _pascal.
User’s Manual U14872EJ1V0UM
349