Translator Overview
11.1 Translator Overview
11.1.1 What the Translator Does
11.1.2 What the Translator Does Not Do
11-2
The
TMS320C54x
mnemonic assembly instructions into algebraic assembly instructions.
Mnemonic instructions usually consist of a keyword and operands. Algebraic
instructions usually consist of operands and operators. Algebraic instructions
resemble higher-level programming language instructions.
The translator requires error-free code. When the translator encounters
unrecognized instructions or macro invocations, it prints a message to stan-
dard output and does not translate the line of code.
The translator accepts assembly code source files containing mnemonic
instructions and produces assembly code source files containing algebraic
instructions. The input file can have no extension or an extension of asm . The
output file will have the same name as the input file with an extension of cnv .
The translator accomplishes the following:
-
Replaces a mnemonic with an algebraic representation of what the
instruction does as defined by the language specifications. The algebraic
representation might consist of more than one line of code.
-
Reformats mnemonic instruction operands into algebraic syntax as de-
scribed in the language specifications. This reformatting includes the
following:
J
Data memory address (dma) accesses are prefixed with a @ symbol.
J
The mnemonic indirect shorthand * is replaced with *AR0.
J
When necessary, constants are prefixed with a # symbol.
J
Algebraic expressions that are used as a single operand and have
more than one term are enclosed in parentheses.
The translator has the following limitations:
-
The translator cannot convert macro definitions. It ignores them. Optional-
ly, the translator replaces macro invocations with the expanded macro,
replacing the formal parameters with the actual arguments used at invoca-
tion.
-
The translator attempts to translate any macro that has the same name
as a mnemonic instruction. Insure that macro names are different from
mnemonic instructions.
mnemonic-to-algebraic
translator
utility
converts
Need help?
Do you have a question about the TMS320C54x and is the answer not in the manual?