Examples – Zilog ZUSBOPTS User Manual
Page 199

UM017105-0511
Predefined Macros
Zilog Developer Studio II – ZNEO™
User Manual
171
All predefined macro names begin with two underscores and end with two underscores.
Examples
The following program illustrates the use of some of these predefined macros:
#include
void main()
{
#ifdef __ZILOG__
printf("Zilog Compiler ");
#endif
#ifdef __ZNEO__
printf("For ZNEO ");
#endif
#ifdef __ZDATE__
printf("Built on %d.\n", __ZDATE__);
#endif
}
__CONST_IN_ROM__
This macro indicates that the const variables are placed in
ROM. This macro, which is optional in some other Zilog proces-
sor architectures, must always be defined for the ZNEO.
__MODEL__
This macro indicates the memory model used by the compiler
as follows:
0Small Model
3Large Model
__UNSIGNED_CHARS__
This macro is defined if the plain char type is implemented as
unsigned char
.
__ZDATE__
This macro expands to the build date of the compiler in the for-
mat YYYYMMDD. For example, if the compiler were built on
May 31, 2006, then __ZDATE__ expands to 20060531. This
macro gives a means to test for a particular Zilog release or to
test that the compiler is released after a new feature has been
added.
__ZILOG__
This macro is defined and set to 1 on all Zilog compilers to indi-
cate that the compiler is provided by Zilog.
__ZNEO__
This macro is defined and set to 1 for the ZNEO compiler and is
otherwise undefined.