
Software Project Management
Address Assignment
4-10
DSP ASSEMBLER REFERENCE MANUAL
For More Information On This Product,
Go to: www.freescale.com
MOTOROLA
is in relative mode and the load counter expression is relative, the overlay is relocatable.
Runtime relocatable overlay code is addressed relative to the location given in the runtime
location counter expression. This expression, if relative, may not refer to another overlay
block. See section 1.7 for more information on location counters and overlays.
The values and memory space attributes of both the load and runtime location counters
can be accessed with the
@LCV
function (see Section 3.8). This is particularly useful
when assigning the load location counter value to a label as a reference point for the over-
lay manager part of the program. The
H
igh,
L
ow, default, or numbered counter assign-
ment can be determined by using the
@CTR
function (Section 3.8).
4.5.3
Address Assignment Examples
Some examples of the
ORG
directive are as follows:
ORG
P:$1000
Sets the runtime memory space to P. Selects the default runtime counter (counter
0) associated with P space to use as the runtime location counter and initializes it
to $1000. The load memory space is implied to be P, and the load location counter
is assumed to be the same as the runtime location counter.
ORG
PHE:
Sets the runtime memory space to P. Selects the H load counter (counter 2) as-
sociated with P space to use as the runtime location counter. The H counter will
not be initialized, and its last value will be used. Code generated hereafter will be
mapped to external (E) memory. The load memory space is implied to be P, and
the load location counter is assumed to be the same as the runtime location
counter.
ORG
PI:OVL1,Y:
Indicates code will be generated for an overlay. The runtime memory space is P,
and the default counter is used as the runtime location counter. It will be reset to
the value of OVL1. If the Assembler is in absolute mode via the
-A
command line
option then OVL1 must be an absolute expression. If OVL1 is an absolute expres-
sion the Assembler uses the absolute runtime location counter. If OVL1 is a relo-
catable value the Assembler uses the relative runtime location counter. In this case
OVL1 must not itself be an overlay symbol (e.g. defined within an overlay block).
The load memory space is Y. Since neither H, L, nor any counter expression was
specified as the load counter, the default load counter (counter 0) will be used as
the load location counter. The counter value and mode will be whatever it was the
last time it was referenced.
F
Freescale Semiconductor, Inc.
n
.