English
Language : 

CC78K0S Datasheet, PDF (426/520 Pages) NEC – C Compiler Ver.1.30 or Later Language
CHAPTER 11 EXTENDED FUNCTIONS
Static Model Expansion Specification
-ZM
(Output object …continued)
When -SM8, -ZM2, -QC are specified
@@CODE
_main:
; line
; line
; line
; line
CSEG
movw
push
ax,_@KREG10
ax
;
; Saves the _@KREG10 to _@KREG15 areas
movw ax,_@KREG12
;
push ax
;
movw ax,_@KREG14
;
push ax
;
5 : char a = 1, b = 2, c = 3, d = 4, e = 5, r;
mov
_@KREG15,#01H ; a,1 Allocates variables to _@KREG11 to _@KREG15
mov
_@KREG14,#02H ; b,2
mov
_@KREG13,#03H ; c,3
mov
_@KREG12,#04H ; d,4
mov
_@KREG11,#05H ; e,5
6:
7 : r = func1(a, b, c, d, e);
mov
a,_@KREG11
mov
_@NRAT01,a
;e
; Sets the 5th argument to the saddr area for receiving
and passing arguments
mov
a,_@KREG12
mov
_@NRAT00,a
;d
; Sets the 4th argument to the saddr area for receiving
and passing arguments
mov
a,_@KREG13
;c
movw hl,ax
mov
a,_@KREG14
;b
movw bc,ax
mov
a,_@KREG15
;a
call !_func1
mov
_@KREG10,a
;r
8:}
pop
movw
ax
_@KREG14,ax
;
; Restores the _@KREG10 to _@KREG15 areas
pop
ax
;
movw _@KREG12,ax
;
pop
ax
;
movw _@KREG10,ax
;
ret
426
User’s Manual U14872EJ1V0UM