Motorola dsp assembler Reference Manual



Yüklə 4,8 Kb.
Pdf görüntüsü
səhifə70/91
tarix08.10.2017
ölçüsü4,8 Kb.
#3546
1   ...   66   67   68   69   70   71   72   73   ...   91

Assembler Listing File Format
Listing File Commentary
D-2
DSP ASSEMBLER REFERENCE MANUAL
MOTOROLA
lines) have been shifted right to make room for line numbers and constant or data value
displays, as for example with the group of equates beginning on line 12.
On line 19 an INCLUDE directive causes the source input to be switched to a file named
SIN16.ASM in the FFTLIB subdirectory. This usage of INCLUDE is provided for illustrative
purposes, since the previous MACLIB declaration makes it unnecessary. By line 20 the
input stream has changed to the new file; the first line of the new file is the definition line
for a macro that will initialize the FFT sine and cosine tables in X and Y memory. Notice
the lower case ‘m’ to the right of the line number on line 21 and following. This indicates
that a macro definition is in progress; the lines are not assembled but are retained for mac-
ro expansion later.
At line 41 the ENDM directive is encountered, as well as the end of the included macro
file. The source input reverts to the original file, the next line of which is an invocation of
the macro (SIN16) just defined. Since the MEX option was not specified, the macro ex-
pansion does not appear in the listing. However, on the next non-empty source line, the
OPT directive is used again to turn on printing of macro expansions and turn off the dis-
play of macro definitions (NOMD).
Line 68 of the listing contains an ORG directive which sets up the initial value of the runt-
ime location counter to $200. The memory space and counter value are shown to the right
of the line number column. If an overlay had been defined here (see Chapter 4), the load
memory space and location counter would appear to the right of the runtime space and
counter value. The line numbers then skip to line 151 which contains a call to the macro
DITFFT. The macro was not defined in this source file but its definition was read from an
external file in a macro library directory as specified by the prior MACLIB directive. The
skipped line numbers represent that definition, which does not appear due to the previ-
ously given NOMD option.
Line 203 illustrates several listing features of the Assembler. The plus sign (+) to the right
of the line number column indicates a macro expansion in progress. The next field is the
memory space and location counter value, followed by the encoded instruction. The mne-
monic and operand fields are spread out for easier reading. The ‘00000227’ by itself on
line 204 is the loop address for the DO loop; it is stored in the second instruction word and
represents one less than the address of the label _end_pass.
On page 7 there are two errors reported in the listing. Error messages contain the listing
line number, the source file name and the source line number where the error occurred,
a severity level (WARNING, ERROR, or FATAL), and the message text. In addition, the
error message may contain extra information indicating erroneous symbols or the field
(Label, Opcode, Operand, Opcode 2, Operand 2, X Move, Y Move) where the error oc-
curred. Page 8 is the end of the source statement listing. After the END directive at line
232, the Assembler reports the total number of errors and warnings it encountered during
the assembly process. 
After the source listing, the Assembler records other information encountered during as-
sembly. On page 9 the names of the two macros used in the program are listed, along
with their definition lines in the source listing. If any sections had been declared in the pro-


Assembler Listing File Format
Cross-reference Format
MOTOROLA
DSP ASSEMBLER REFERENCE MANUAL
D-3
gram they would be shown here, as well as define symbols and their corresponding sub-
stitution strings. Next the symbol table is output, sorted by symbol name. The symbol table
data includes the symbol type (integer, floating point), its value, the section where it was
defined if applicable, and any attributes it may have (LOCAL, GLOBAL, SET).
Figure D-3 contains an annotated Assembler listing line showing virtually every possible
listing field. The significance of some fields may require further explanation. The macro
definition/expansion column will contain a plus sign (+) during macro expansion. It will
contain a lower case ‘m’ during macro definition, and a lower case ‘d’ during data constant
expansion (the CEX option used with the DC directive). When a nested macro is expand-
ed, this column will contain both a lower case ‘m’ and a plus sign. A lower case ‘i’ in this
column indicates that the line has been skipped as a result of an IF-THEN-ELSE directive
sequence. A lower case ‘p’ means that the line was automatically generated by the As-
sembler, ordinarily to introduce pipeline delay.
D.3
  CROSS-REFERENCE FORMAT
The Assembler will optionally generate a cross-reference listing of all symbols used in the
source program. This can be done by using the CEX option of the OPT directive (Chapter
6). The cross-reference listing for the above sample program is shown in Figure D-2. It
contains a sorted table of symbols, each one followed by a list of line numbers in the
source listing where a reference to the symbol occurred. Line numbers followed by an as-
terisk (*) indicate the line where the symbol was defined.
D.4
  MEMORY UTILIZATION REPORT FORMAT
The Assembler can optionally record and report allocation and usage of the separate
memory spaces of the target DSP. This is done with the MU option of the OPT directive
(Chapter 6). A memory utilization report is a memory map showing data allocation, code
generation, and unused memory areas along with associated label, section, and overlay
information, if available.
Figure D-4 shows the memory utilization report for the Assembler source in Figure D-5.
The individual X, Y, L, and P memory spaces are reported separately. The starting and
ending addresses, length, type, and any label, section, or overlay data are display for
each reported block. The blocks are delimited by the occurrence in the source of either a
data allocation directive (BSCDCDSDSMDSR) or an ORG directive.
In the X memory report of Figure D-4 the first reported block is an uninitialized area of
1024 words. This corresponds to the first DS directive in Figure D-5, which reserves 1024
words of memory in X data space. The next block of memory in X data space is the overlay
code for the FIR filter. It begins immediately after the first block and is ten words long.
The type column shows what kind of code or data has been generated, as well as indicat-
ing that a block is unused.  In the line corresponding to the first DS directive in the source,
the type is DATA to indicate that it is an uninitialized data area.  There are other types for
initialized data, code, and modulo and reverse carry buffers.  For example, the second


Yüklə 4,8 Kb.

Dostları ilə paylaş:
1   ...   66   67   68   69   70   71   72   73   ...   91




Verilənlər bazası müəlliflik hüququ ilə müdafiə olunur ©genderi.org 2024
rəhbərliyinə müraciət

    Ana səhifə