Accessing Individual Characters of Subscripted Substitution Symbols

In a macro, you can access the individual characters (substrings) of a substitution symbol with subscripted substitution symbols. You must use the forced substitution operator for clarity.

You can access substrings in two ways:

Example 8 and Example 9 show built-in substitution symbol functions used with subscripted substitution symbols. In Example 8, subscripted substitution symbols redefine the ADD instruction so that it handles short immediate values. In Example 9, the subscripted substitution symbol is used to find a substring strg1 beginning at position start in the string strg2. The position of the substring strg1 is assigned to the substitution symbol pos.