English
Language : 

CC78K0S Datasheet, PDF (328/520 Pages) NEC – C Compiler Ver.1.30 or Later Language
CHAPTER 11 EXTENDED FUNCTIONS
noauto Function
noauto
(Output object of compiler)
@@CODE CSEG
_main:
;line 5: static short ii, jj, kk;
;line 6: l = nfunc(ii, jj, kk);
mov
a, !?L0005
; kk
xch
a, x
mov
a, !?L0005+1
; kk
push
ax
mov
a, !?L0004
; jj
xch
a, x
mov
a, !?L0004+1
; jj
push
ax
mov
a, !?L0003
; ii
xch
a, x
mov
a, !?L0003+1
; ii
call
!_nfunc
; Calls nfunc (a, b, c) function
pop
ax
pop
ax
movw
ax, bc
mov
!_1+1, a
; Assigns the return value to external variable l
xch
a, x
mov
!_l, a
;line 7: }
ret
;line 8: noauto short nfunc (short a, short b, short c)
;line 9: {
_nfunc:
push
hl
; Saves HL
xch
a, x
;
xch
a, _@KREG12
; Sets argument a to _@KREG12
xch
a, x
;
xch
a, _@KREG13
;
push
ax
; Saves _@KREG12
movw
ax, _@KREG14
;
push
ax
; Saves _@KREG14
movw
ax, sp
;
movw
hl, ax
;
mov
a,[hl+10]
;
xch
a, x
;
mov
a,[hl+11]
;
movw
_@KREG14, ax
; Sets argument c to _@KREG14
mov
a,[hl+8]
;
xch
a, x
;
mov
a,[hl+9]
;
movw
hl, ax
; Sets argument b to HL
328
User’s Manual U14872EJ1V0UM