
UM017105-0511 Language Extensions
Zilog Developer Studio II – ZNEO™
User Manual
161
Pointer Conversions
A pointer to a qualified space type can be converted to a different qualified space type as
shown in Table 12.
Memory Models
The ZNEO C-Compiler provides two memory models:
•
Small memory model
•
Large memory model
Each of these two models is described in this section.
Small Memory Model
In the small memory model, global variables are allocated in RAM address space. The
address of these variables is 16 bits. The locals and parameters are allocated on the
stack which is located in RAM address space. The address of a local or parameter is a
16-bit address. The global variables can be manually placed into the ERAM, ROM, or
EROM address space by using the
_Far, _Rom, and _Erom address specifiers, respec-
Table 12. Pointer Conversion*
Destination
Source
unqualified const volatile _Near _Far _Rom _Erom
unqualified v W W v L v L
const v vWvLvL
volatile v W v v L v L
_Near S WS WS v X v X
_Far vWWvvvL
_Rom S WS WS v X v X
_Erom vWWvvvv
Notes:
1. v represents Valid.
2. W represents Warning.
3. S represents Valid in Small Model (Error in Large Model).
4. L represents Valid in Large Model (Error in Small Model).
5. WS represents Warning in Small Model (Error in Large Model).
6. WL represents Warning in Large Model (Error in Small Model).
7. X represents Error.
Komentáře k této Příručce