Motorola DSP Assembler
Assembler Support For Digital Signal Processing
1-10
DSP ASSEMBLER REFERENCE MANUAL
For More Information On This Product,
Go to: www.freescale.com
MOTOROLA
runtime memory space
and
runtime address
, respectively. If the Assembler only used
the load address to assign values to labels, then the program would not contain the cor-
rect label references when it was transferred to the runtime memory space and the run-
time address.
During the assembly process, the Assembler uses location counters to record the ad-
dresses associated with the object code. In order to facilitate the generation of object code
for overlays, the Assembler maintains two different location counters, the
load location
counter
, which determines the address into which the object code will be loaded and the
runtime location counter
, which determines the address assigned to labels. In addition,
the Assembler keeps track of the
load memory space
, which is the memory space into
which the object code will be loaded, and the
runtime memory space
, which is the mem-
ory space to which an overlay will be transferred and the memory space attribute that will
be assigned to labels. See Chapter 4, Software Project Management, for a practical dis-
cussion of the use of memory spaces and location counters.
The Motorola digital signal processors are capable of performing operations on modulo
and reverse-carry
buffers
, two data structures useful in digital signal processing applica-
tions. The DSP Assembler provides directives for establishing buffer base addresses, al-
locating buffer space, and initializing buffer contents. For a buffer to be located properly
in memory the lower bits of the starting address which encompass one less than the buffer
size must be zero. For example, the lowest address greater than zero at which a buffer of
size 32 may be located is 32 (20 hexadecimal). More generally, the buffer base address
must be a multiple of 2
k
, where 2
k
is greater than or equal to the size of the buffer. Buffers
can be allocated manually or by using the Assembler buffer directives (see Chapter 6).
The Assembler operates in either
absolute
or
relative
mode, depending on the presence
of the command line
-A
option. In relative mode the Assembler creates relocatable object
files. These files can be combined and relocated using the Motorola DSP linker. In ab-
solute mode the Assembler generates absolute object files. Absolute files cannot be re-
located but can be loaded directly for execution. By default the Assembler runs in relative
mode.
1.8
ASSEMBLER SUPPORT FOR DIGITAL SIGNAL PROCESSING
As mentioned previously, the Assembler offers facilities commonly found in other macro
Assemblers, such as nested macro capabilities, include files, and conditional assembly.
The Assembler must also provide extensions in support of the unconventional architec-
ture of the Motorola digital signal processors, as well as aids for programming DSP-spe-
cific applications. Some of these features are discussed briefly below; see the
appropriate chapters later in this manual for more information.
The Assembler supports the use of arbitrary algebraic expressions as arguments to vari-
ous directives and as immediate operands in certain instructions. Terms of these expres-
sions may consist of the Assembler’s own built-in functions, which perform data
conversion, comparison, and computational operations. In the digital signal processing
domain transcendental functions for computing sine, cosine, and natural logarithm are
F
Freescale Semiconductor, Inc.
n
.