How to do token pasting in MPASM?
Ned Konz email (remove spam text)
Say I want to make a MPASM macro that will be invoked as:
and will generate the following code:
abcxyz equ 123
That is, it pastes its two arguments together to make a label. Is this
possible in MPASM? How about:
abcxyz equ "abcxyz"
Which also pastes the arguments together and makes a string out of
I know how to do it in C using the ## token pasting operator and the #
stringizing operators (and the fact that two adjacent strings are
But I only see the #v(<expr>) form that would allow tokens to be
pasted together (with an intervening number).
After reading the MPASM manual I can't figure out how to do these. I
hope this isn't an oversight.
GPG key ID: BEEA7EFE
http://www.piclist.com hint: To leave the PICList
See also: www.piclist.com/techref/microchip/languages.htm?key=asm
You must be a member of the
piclist mailing list
(not only a www.piclist.com member) to post to the