English
Language : 

CC78K4 Datasheet, PDF (462/523 Pages) NEC – CC78K4 Ver.2.30 or Later, C Compiler Language
CHAPTER 11 EXTENDED FUNCTIONS
(Output code) With small model, when -ZO is specified
@@CODES
_main:
push
movw
movw
call
pop
ret
_func2:
ret
CSEG BASE
rp3,vp
rp3,#01234H
vp,#05678H
!_func2
rp3,vp
;4660
;22136
;Save registers for arguments
;Allocate arguments to rp3
;Allocate arguments to vp
;Function call
;Restore registers for arguments
(Output code) With small model, when -ZO is not specified
@@CODES
_main:
movw
push
movw
call
pop
ret
_func2:
push
movw
movw
movw
pop
ret
CSEG
BASE
ax,#05678H ; 22136
ax
ax,#01234H ; 4660
!_func2
ax
;Arguments passed via stack
;The first argument is passed via register
;Function call
;Arguments passed via stack
rp3,up
rp3,ax
ax,[sp+7]
up,ax
rp3, up
;Save registers for arguments
;Allocate arguments to rp3
;Argument passed via stack received by register
;Allocate arguments to up
;Restore registers for arguments
462
User’s Manual U15556EJ1V0UM