Language extensions, D in the – Zilog ZUSBOPTS User Manual
Page 184

Language Extensions
UM017105-0511
156
Zilog Developer Studio II – ZNEO™
User Manual
Language Extensions
To give you additional control over the way the ZNEO C-Compiler allocates storage and
to enhance its ability to handle common real-time constructs, the compiler implements the
following extensions to the ANSI C standard:
•
Additional Keywords for Storage Specification
The compiler divides the ZNEO CPU memory into four memory spaces: Near ROM,
Extended ROM, Near RAM, and Extended (Far) RAM. It provides the following key-
words with which you can control the storage location of data in these memory
spaces:
–
_Near
(near)
–
_Far
(far)
–
_Rom
(rom)
–
_Erom
(erom)
These keywords can also be used to specify the memory space to which a pointer is
pointing to.
•
The compiler supports two memory models: small and large. These models allow you
to control where data are stored by default. Each application can only use one model.
The model can affect the efficiency of your application. Some of the memory alloca-
tion defaults associated with a memory model can be overridden using the keywords
for storage specification.
•
The ZNEO CPU supports various interrupts. The C-Compiler provides language
extensions to designate a function as interrupt service routine and provides features to
set each interrupt vector.
•
The placement directives allow users to place objects at specific hardware addresses
and align objects at a given alignment.
•
Because the ZNEO CPU has multiple address spaces, the C-Compiler provides lan-
guage extensions to specify the storage for string constants.
•
The C-Compiler provides directives for embedding assembly instructions and direc-
tives into the C program.
•