Special cases – Zilog EZ80F916 User Manual
Page 171

UM014423-0607
Using the ANSI C-Compiler
ZiLOG Developer Studio II
eZ80Acclaim!
®
User Manual
151
The function call mechanism described in this section is a dynamic call mechanism. In a
dynamic call mechanism, each function allocates memory on stack for its locals and tem-
poraries during the run time of the program. When the function has returned, the memory
that it was using is freed from the stack. The following figure shows a diagram of the
eZ80Acclaim! C-Compiler dynamic call frame layout.
Figure 88. Call Frame Layout
Special Cases
Some function calls do not follow the mechanism described in “Function Call Mecha-
nism” on page 149:
Table 2. Returning Values
Type
Register
Register Contents: Most to Least Significant
char
A
xx
short
HL
?? xx xx
int
HL
xx xx xx
long
E:HL
xx: xx xx xx
float
E:HL
xx: xx xx xx
double
E:HL
xx: xx xx xx
pointer
HL
xx xx xx
Temporaries
Locals
Callers Frame Pointer 23:0
Return Address 23:0
Parameter 0
Parameter 1
…
Parameter N
IX
SP
Run Time Stack
High Address
Low Address