piclist 2003\02\21\005316a >
Thread: How to do token pasting in MPASM?
www.piclist.com/techref/microchip/languages.htm?key=asm
flavicon
face BY : Ned Konz email (remove spam text)



On Thursday 20 February 2003 08:32 pm, Dwayne Reid wrote:
> At 07:23 PM 2/20/03 -0800, Ned Konz wrote:
> >On Thursday 20 February 2003 07:12 pm, Dwayne Reid wrote:
> >
> >No, I couldn't find a way to make #define work.
>
> Can you give a concrete example of what you want to accomplish?  In
> other words, show the specific input and output you want (as
> opposed to the generic xyz examples you posted earlier).  I'm
> thinking that once we see what you are trying to accomplish,
> someone might have an idea.

What I want to do is to make a set of macros for programming
state-machine based programs.

Each type of state machine (there can be multiple instances of the
same kind of state machine, of course) has several tables associated
with it, as well as one subroutine per state.

I want to make it so you can have two different kinds of state
machines that have states with the same name (to make it easier to
re-use state machine code).

So I want to decorate the enames of the state subroutines with the
name of the kind of state machine they're used in. This way, I can
have two "idle" states in different kinds of state machines, but
their labels will still be unique.

I should be able to do this using the #v() operator to paste tokens,
though they'll have a useless number in between. At least they'll be
unique.

--
Ned Konz
http://bike-nomad.com
GPG key ID: BEEA7EFE

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads
<200302202105.43421@ned.bike-nomad.com> 7bit

In reply to: <4.3.2.7.2.20030220213027.00dc8220@pop.telusplanet.net>
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...