SPRUI03E June 2015 – January 2023
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.
force .macro x
.loop 8
PORT:x: .set x*4
.eval x+1, x
.endloop
.endm
.global portbase
force
PORT0 .set 0
PORT1 .set 4
.
.
.
PORT7 .set 28