Special cases for a called function, Returning a structure, Not allocating a local frame – Zilog Z80380 User Manual
Page 67: Using the run-time library

UM004001-COR1103
4–3
Run Time Environment
Using the Run-Time Library
S
PECIAL
CASES
FOR
A
CALLED
FUNCTION
The following exceptions apply to special cases for called functions.
Returning a structure
If the function returns a structure, the caller allocates the space for the structure on top of the
stack. The size of the space allocated is the size of structure plus two additional bytes. To
return a structure, the called function then copies the structure to the space allocated by the
caller.
Not allocating a local frame
If there are no local variables, no arguments, no use of temporary locations, the code is not
being compiled to run under the debugger and the function does not return a structure, there
is no need to allocate a stack frame.
USING THE RUN-TIME LIBRARY
The C-Compiler provides a collection of run-time libraries that can be easily referenced and
incorporated into your code. The following sections describe the use and format of run-time
libraries. Each library function is declared in a supplied header file. These header files can be
included in C programs using the #include preprocessor directive. See Defining Prepro-
cessor Symbols on page 1-17 for more information on including header files.
Each header file contains declarations for a set of related functions plus any necessary types
and additional macros. See Table 4-1 for a description of each header file that is include with
the C-Compiler.
The header files are installed in the include directory of the compiler installation path. The
library files are installed in the lib directory of the compiler installation path.