English
Language : 

CC78K0S Datasheet, PDF (397/520 Pages) NEC – C Compiler Ver.1.30 or Later Language
CHAPTER 11 EXTENDED FUNCTIONS
Static Model
EXAMPLE
An example of the -SM4 specification is as follows.
(C source)
void sub (char, char, char) ;
void main ()
{
char i = 1 ;
char j, k ;
j=2;
k=i+j;
sub (i, j, k) ;
}
void sub (char p1, char p2, char p3)
{
char a1, a2 ;
a1 = 1<<p1 ;
a2 = p2 + p3 ;
}
(Output object of compiler)
@@DATA DSEG
!L0003: DS (1)
!L0004: DS (1)
!L0005: DS (1)
!L0008: DS (1)
; Automatic variable i of function main
; Automatic variable j of function main
; Automatic variable k of function main
; Automatic variable a2 of function sub
; line
; line
; line
1: void sub (char, char, char) ;
2: void main ()
3: {
@@CODE CSEG
_main:
; line 4 : char i = 1 ;
mov
a,#01H
mov !?L0003,a
; line 5: char j, k ;
;1
;i ; Automatic variable i
User’s Manual U14872EJ1V0UM
397