English
Language : 

CC78K0S Datasheet, PDF (345/520 Pages) NEC – C Compiler Ver.1.30 or Later Language
CHAPTER 11 EXTENDED FUNCTIONS
Interrupt Functions
#pragma vect
#pragma interrupt
Interrupt request name:
Function name:
Stack change specification:
Stack use specification:
No change specification:
Shared area save/restore specification:
Save/restore target:
∆:
Described in uppercase letters. Refer to the user’s manual of the
target device used (example: NMI, INTP0, etc.).
Name of the function that describes interrupt processing
SP = array name [+ offset location] (example: SP = buff + 10)
Define the array by unsigned char (example: unsigned char buff
[10];).
STACK (default)
NOBANK
leafwork 1 to 16 (when -SM option specified)
SAVE_R Save/restore target limited to registers
SAVE_RN Save/restore target limited to registers and _@NRATxx
(when -SM, -ZM option specified)
Space
RESTRICTIONS
• Register bank specification is not supported.
• An interrupt request name must be described in uppercase letters.
• A duplication check on interrupt request names will be made within only one module.
• If the same or another interrupt occurs due to the contents of the priority specification flag register and
interrupt mask flag register while a vectored interrupt is processed, the contents of the registers may be
changed if no change is specified, resulting in an error. The compiler, however, cannot check this error.
• callt/noauto/norec/_ _callt/_ _leaf/_ _pascal cannot be specified as the interrupt functions.
• An interrupt function is specified with void type (example: void func (void);) because it cannot have an
argument or a return value.
• Even if an ASM statement exists in the interrupt function, codes saving all the registers and variable areas are
not output. If an area reserved for the compiler is used in the ASM statement in the interrupt function,
therefore, or if a function is called in the ASM statement, the user must save the registers and variable areas.
• If a function specifying no change, register bank, or stack change as the saving destination in #pragma
vect/#pragma interrupt specification is not defined in the same module, a warning message is output and
the stack change is ignored. In this case, the default stack is used.
User’s Manual U14872EJ1V0UM
345