Zilog EZ80F916 User Manual
Page 175
UM014423-0607
Using the ANSI C-Compiler
ZiLOG Developer Studio II
eZ80Acclaim!
®
User Manual
155
As mentioned at the beginning of this chapter, the eZ80Acclaim! C-Compiler is a con-
forming freestanding 1989 ANSI C implementation with some exceptions. In accordance
with the definition of a freestanding implementation, the compiler supports the required
standard header files <
float.h
>, <
limits.h
>, <
stdarg.h
>, and <
stddef.h
>. It also
supports additional standard header files and ZiLOG-specific nonstandard header files.
The standard header files and functions are, with minor exceptions, fully compliant with
the ANSI C Standard. They are described in detail in “C Standard Library” on page 318.
The deviations from the ANSI Standard in these files are summarized in “Library Files
Not Required for Freestanding Implementation” on page 166.
In ZDS II for the eZ80Acclaim!, the nonstandard library of ZiLOG-specific header files
and functions has been structured into ZSL (the ZiLOG Standard Library). Detailed infor-
mation about the contents of that library can be found in the ZSL API Manual. Addition-
ally, most C projects for the eZ80Acclaim! will find it useful to include the nonstandard
header file <
eZ80.h
>. This header in turn includes a processor-specific header file (such
as
eZ80F91.h
) using the CPU that has been selected in your project. That file provides
preprocessor definitions for the many special-function registers (SFRs) and memory-
mapped I/O registers of your selected eZ80Acclaim! CPU so that they can be referred to
symbolically in your program.
NOTE: The ZiLOG-specific header file <
eZ80.h
> as well as the CPU-specific files such
as <
eZ80F91.h
> are located in the following directory:
<ZDS Installation Directory>
\include\zilog
where <ZDS Installation Directory> is the directory in which ZiLOG Developer Studio
was installed. By default, this would be
C:\Program
Files\ZiLOG\ZDSII_eZ80Acclaim!_<version>
, where <version> might be
4.11.0
or
5.0.0.
There is an important interrelationship between the C Standard Library (described in “C
Standard Library” on page 318) and the ZSL. Some functions of the C Standard Library
make calls into ZSL functions at the point where access to actual eZ80
®
peripheral hard-
ware is needed. The most common example of this is that the standard function
putchar()
makes a call to the ZSL function
putch()
in order to write a character to the
eZ80’s UART device. Therefore, if you make calls to certain standard functions, you will
find it necessary either to link the ZSL to your project as well or to provide some other
means of getting hardware-related calls resolved. You can do that either by writing your
own versions of
putch()
and other ZSL functions that are called from the C Standard
Library or by rewriting the C Standard Library functions to call some other function you
have provided. For more information about linking in the C Standard Library and/or ZSL
to your project, see “Use Default Libraries” on page 87.
NOTE: There is no unnecessary code size penalty associated with linking in the C
Standard Library or ZSL. Only those functions that are called in your code are
linked to your application.