beautypg.com

Figure 137. z8 encore! memory layout – Zilog Z8F0130 User Manual

Page 221

background image

UM013037-1212

Additional Keywords for Storage Specification

Zilog Developer Studio II – Z8 Encore!

User Manual

197

Storage Specification for Pointers

To properly access

near

,

far

, and

rom

objects using a pointer, the compiler provides the

ability to associate the storage specifier with the pointer type:

near

pointer

A

near

pointer points to near data.

far

pointer

A

far

pointer points to far data.

rom

pointer

A

rom

pointer points to ROM data.

For example:

char *p;/* p is a pointer to a :

near char : small model

far char : large model. */

char far *fp;/* fp is a pointer to a far char,

fp itself is stored in:

near memory for small model

far memory for large model. */

char far * far fpf;/* fpf is a pointer to a far

char,

fpf itself is stored in far

Figure 137. Z8 Encore! Memory Layout

rom

0000

FFFF

near

far

FFF

100

00

FF

Register File

Flash