SLAU131Y October 2004 – June 2021
In some cases, substitution symbols are not recognizable to the assembler. The forced substitution operator, which is a set of colons surrounding the symbol, enables you to force the substitution of a symbol's character string. Simply enclose a symbol with 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 surrounded by colons before expanding 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.
Using the Forced Substitution Operator shows how the forced substitution operator is used.
1 force .macro
2 .asg 0,x
3 .loop 8
4 AUX:x: .set x
5 .eval x+1,x
6 .endloop
7 .endm
8
9 00000000 force
1 .asg 0,x
1 .loop 8
1 AUX:x: .set x
1 .eval x+1,x
1 .endloop
2 00000000 AUX0 .set 0
2 .eval 0+1,x
2 00000001 AUX1 .set 1
2 .eval 1+1,x
2 00000002 AUX2 .set 2
2 .eval 2+1,x
2 00000003 AUX3 .set 3
2 .eval 3+1,x
2 00000004 AUX4 .set 4
2 .eval 4+1,x
2 00000005 AUX5 .set 5
2 .eval 5+1,x
2 00000006 AUX6 .set 6
2 .eval 6+1,x
2 00000007 AUX7 .set 7
2 .eval 7+1,x