piclist 2003\02\20\222533a >
Thread: How to do token pasting in MPASM?
face BY : Ned Konz email (remove spam text)

On Thursday 20 February 2003 07:12 pm, Dwayne Reid wrote:
> At 12:30 PM 2/20/03 -0800, Ned Konz wrote:
> >Say I want to make a MPASM macro that will be invoked as:
> >
> >         MyMacro abc,xyz
> >
> >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:
> This may not help, but will #define work for you?  I recall that I
> tried in vain to make a macro do something out of the ordinary but
> was able to get #define to do what I wanted.  Don't recall what it
> was, though.

No, I couldn't find a way to make #define work.

Ned Konz

http://www.piclist.com hint: To leave the PICList
<200302201923.43588@ned.bike-nomad.com> 7bit

In reply to: <>
See also: www.piclist.com/techref/microchip/languages.htm?key=asm
Reply You must be a member of the piclist mailing list (not only a www.piclist.com member) to post to the piclist. This form requires JavaScript and a browser/email client that can handle form mailto: posts.
Subject (change) How to do token pasting in MPASM?

month overview.

new search...