Ansi standard compliance, Freestanding implementation – Zilog Z8F0130 User Manual
Page 279
UM013037-1212
ANSI Standard Compliance
Zilog Developer Studio II – Z8 Encore!
User Manual
255
are required to make a complete executable load file. In this case, those other modules are
the C start-up modules for the large model (
startupl.obj
), the code generator helper
library (
chelpd.lib
), the C run-time library for the large dynamic model with debug
(
crtldd.lib
), the floating-point library (
fpldd.lib
), and the C Serial IO library for
that same configuration (
csioldd.lib
).
An important point to understand in using the linker is that the linker intelligently links in
only those object modules that are necessary to resolve its list of unresolved symbols.
Also, the Zilog version of the C Standard Library is organized so that each module con-
tains only a single function or, in a few cases, a few closely related functions. So, although
the C run-time library contains a very large number of functions from the C Standard
Library, if your application only calls two of those functions, then only those two are
linked into your application (plus any functions that are called by those two functions in
turn). This means it is safe for you to simply link in a large library, such as
crtldd.lib
and
fpldd.lib
in this example. No unnecessary code is linked in, and you avoid the
extra work of painstakingly finding the unresolved symbols and linking only to those spe-
cific functions.
ANSI Standard Compliance
The Zilog Z8 Encore! C-Compiler is a freestanding ANSI C compiler (see the
section on page 255), complying with the 1989 ISO standard, which is
also known as ANSI Standard X3.159-1989 with some deviations, which are described in
the
Freestanding Implementation
A freestanding implementation of the C language is a concept defined in the ANSI stan-
dard itself, to accommodate the needs of embedded applications that cannot be expected to
provide all of the services of the typical desktop execution environment (which is called a
hosted environment in the terms of the standard). In particular, it is presumed that there are
no file system and no operating system. The use of the standard term freestanding imple-
mentation means that the compiler must contain, at least, a specific subset of the full ANSI
C features. This subset consists of those basic language features appropriate to embedded
applications. Specifically, the list of required header files and associated library functions
is minimal, namely <
float.h
>, <
limits.h
>, <
stdarg.h
>, and <
stddef.h
>. A free-
standing implementation is allowed to additionally support all or parts of other standard
header files but is not required to. The Z8 Encore! C-Compiler, for example, supports a
number of additional headers from the standard library, as specified in the
Not Required for Freestanding Implementation
A conforming implementation (that is, a compiler) is allowed to provide extensions, as
long as they do not alter the behavior of any program that uses only the standard features
of the language. The Zilog Z8 Encore! C-Compiler uses this concept to provide language
- Z8F0131 Z8F0230 Z8F0231 Z8F0430 Z8F0431 Z8F043A Z8F0830 Z8F0831 Z8F083A Z8F1232 Z8F1233 Z8F0113 Z8F011A Z8F0123 Z8F012A Z8F0213 Z8F021A Z8F0223 Z8F022A Z8F0411 Z8F0412 Z8F0413 Z8F041A Z8F0421 Z8F0422 Z8F0423 Z8F042A Z8F0811 Z8F0812 Z8F0813 Z8F081A Z8F0821 Z8F0822 Z8F0823 Z8F082A Z8F0880 Z8F1621 Z8F1622 Z8F1680 Z8F1681 Z8F1682 Z8F2421 Z8F2422 Z8F2480 Z8F3221 Z8F3222 Z8F3281 Z8F3282 Z8F4821 Z8F4822 Z8F4823 Z8F6081 Z8F6082 Z8F6421 Z8F6422 Z8F6423 Z8F6481 Z8F6482 Z8FS021A ZMOT1AHH Z8FS040B ZMOT0BHH ZMOT0BSB Z8FMC04 Z8FMC08 Z8FMC16