5.3.5
Forced Substitution
Example 5–7. Using the Forced Substitution Operator
In some cases, substitution symbols are not recognizable to the assembler.
The forced substitution operator, which is a set of colons, enables you to force
the substitution of a symbol's character string. Simply enclose a symbol in
colons to force the substitution. Do not include any spaces between the colons
and the symbol.
The syntax for the forced substitution operator is
:symbol:
The assembler expands substitution symbols enclosed in colons before it
expands other substitution symbols.
You can use the forced substitution operator only inside macros, and you
cannot nest a forced substitution operator within another forced substitution
operator.
Example 5–7 shows how the forced substitution operator is used.
force .macro x
.asg
.loop 8
AUX:x: .set
.eval x+1,x
.endloop
.endm
The force macro would generate the following source code:
AUX0
.set
AUX1
.set
.
.
.
AUX7
.set
Macro Parameters/Substitution Symbols
0,x
x
0
1
7
Macro Language
5-11
Need help?
Do you have a question about the TMS320C54x and is the answer not in the manual?