Example 8. Using Subscripted Substitution Symbols to Redefine an Instruction

storex .macro x .var tmp .asg :x(1):, tmp .if $symcmp(tmp,"A") == 0 STW x,*A15--(4) .elseif $symcmp(tmp,"B") == 0 STW x,*A15--(4) .elseif $iscons(x) MVK x,A0 STW A0,*A15--(4) .else .emsg "Bad Macro Parameter" .endif .endm storex 10h storex A15