Base of, Syntax, Base of versus lowaddr of – Zilog ZUSBOPTS User Manual
Page 303

UM017105-0511
Linker Expressions
Zilog Developer Studio II – ZNEO™
User Manual
275
Syntax
BASE OF
The BASE OF operator provides the lowest used address of a group, address space, or seg-
ment, excluding any segment copies when <name> is a segment. The value of BASE OF
is treated as an expression value.
Syntax
BASE OF <name>
<name> can be a group, address space, or segment.
BASE OF Versus LOWADDR OF
By default, allocation for a given memory group, address space, or segment starts at the
lowest defined address for that memory group, address space, or segment. If you explicitly
define an assignment within that memory space, allocation for that space begins at that
defined point and then occupies subsequent memory locations; the explicit allocation
becomes the default BASE OF value. BASE OF <name> gives the lowest allocated
address in the space; LOWADDR OF <name> gives the lowest physical address in the
space.
For example:
RANGE ROM $0 : $7FFF
RANGE RAM $8000 : $BFFF
/* RAM allocation */
LOCATE s_uninit_data at $8000
LOCATE s_nvrblock at $9000
DEFINE __low_data = BASE OF s_uninit_data
Using
LOCATE s_uninit_data at $8000
or
LOCATE s_uninit_data at LOWADDR OF RAM
gives the same address (the lowest possible address) when
RANGE RAM $8000:$BFFF
.
If
LOCATE s_uninit_data at $8000
is changed to