English
Language : 

CC78K4 Datasheet, PDF (345/523 Pages) NEC – CC78K4 Ver.2.30 or Later, C Compiler Language
CHAPTER 11 EXTENDED FUNCTIONS
Interrupt Functions
#pragma vect
#pragma interrupt
(Output object of compiler) With large model
@@BASE CSEG
_inter:
sel
push
movg
movg
push
call
pop
movg
pop
reti
BASE
RB2
whl
whl,sp
sp,#_buff+10
whl
!!_func
whl
sp,whl
whl
;Changes register bank
;
;Changes stack pointer
;
;
;
;Sets back stack pointer
;
@@VECT06
DW
CSEG
AT 0006H
_inter
COMPATIBILITY
From another C compiler to this C compiler
• Modification is not required if interrupt functions are not used at all.
• When changing an ordinary function to an interrupt function, modify the program according to the method
above.
From this C compiler to another C compiler
• An interrupt function can be used as an ordinary function by deleting its specification with the #pragma
vect, #pragma interrupt directive.
• When an ordinary function is to be used as an interrupt function, change the program according to the
specifications of each compiler.
User’s Manual U15556EJ1V0UM
345