English
Language : 

CC78K0S Datasheet, PDF (435/520 Pages) NEC – C Compiler Ver.1.30 or Later Language
CHAPTER 11 EXTENDED FUNCTIONS
(34) Library supporting prologue/epilogue
Library Supporting Prologue/Epilogue
-ZD
FUNCTION
• A specified pattern of the prologue/epilogue code can be replaced with a library call.
• The number of callt entries that users can use is reduced by two in the case of a normal model and up to ten
in the case of a static model.
• The library replacement patterns in the case of a normal model are as follows.
HL,_@KREGxx save/copy, stack frame secure Æ callt [@@cprep2]
HL,_@KREGxx restore, stack frame release Æ callt [@@cdisp2]
• In the case of a static model, arguments are allocated to _@NRATxx and _@KREGxx so that the first 3
arguments accord with the patterns described below. When char and int are mixed, the allocation interval is
adjusted so that it accords with the patterns of multiple int type arguments.
• The library replacement pattern in the case of a static model is as follows.
(For char 2 arguments)
mov
movw
mov
_@NRAT00,a
ax,bc
_@NRAT01,a
→
callt [@@nrcp2]
mov
movw
mov
_@KREG15,a
ax,bc
_@KREG14,a
→
callt [@@krcp2]
(For char 3 arguments)
mov
movw
mov
movw
mov
_@NRAT05,a
ax,bc
_@NRAT06,a
ax,hl
_@NRAT07,a
mov
movw
mov
movw
mov
_@KREG15,a
ax,bc
_@KREG14,a
ax,hl
_@KREG13,a
mov
movw
mov
movw
mov
_@NRAT06,a
ax,bc
_@NRAT07,a
ax,hl
_@KREG15,a
→
callt [@@nrcp3]
→
callt [@@krcp3]
→
call !@@nkrc3
User’s Manual U14872EJ1V0UM
435