English
Language : 

CC78K0S Datasheet, PDF (484/520 Pages) NEC – C Compiler Ver.1.30 or Later Language
CHAPTER 12 REFERENCING THE ASSEMBLER
12.6 Cautions
(1) ‘_’ (underscore)
This C compiler adds an underscore ‘_’ (ASCII code ‘5FH’) to external definitions and reference names of the
object modules to be output. In the next C program example, “j = FUNC(i, l);” is taken as a reference to the
external name _FUNC.
extern int FUNC(int, long);
void main()
{
int
long
i, j;
l;
i = 1;
l = 0x54321;
j = FUNC(i, l);
}
/* Function prototype */
/* Function call */
The routine name is written as ‘_FUNC’ in RA78K0S.
(2) Argument positions on the stack
The arguments placed on the stack are placed from the postfix argument to the prefix argument in the direction
from the high address to the low address.
Figure 12-5. Stack Positions of Arguments
low address
j=FUNC(i, l);
Stack pointer
Return address to main
l (lower word)
l (higher word)
AX register
i
high address
Stack area
484
User’s Manual U14872EJ1V0UM