Table 11, Default storage specifiers, Space specifier on structure and union members – Zilog ZUSBOPTS User Manual
Page 188
Language Extensions
UM017105-0511
160
Zilog Developer Studio II – ZNEO™
User Manual
Default Storage Specifiers
Default storage specifiers are applied if none is specified. The default storage specifiers
depend on the memory model chosen. Table 11 lists the default storage specifiers for each
model type.
Space Specifier on Structure and Union Members
The space specifier for a structure or union takes precedence over the space specifier of an
individual member. When the space specifier of a member does not match the space spec-
ifier of its structure or union, the space specifier of the member is ignored.
For example:
struct{
_Near char num; /* Warning: _Near space specifier is ignored.
*/
_Near char * ptr; /* Correct: ptr points to a char in _Near
memory. */
/* ptr itself is stored in the memory space of
structure (_Far). */
} _Far mystruct; /* All of mystruct is allocated in _Far
memory.*/
Table 11. Default Storage Specifiers
Function
Globals
Locals
String
Const
Parameters
Pointer
Small (S)
_Erom
_Near
_Near
_Near
_Near
_Near
_Near
Large (L)
_Erom
_Far
_Far
_Far
_Far
_Far
_Far