More than one #v(expression) in a single line of a macro

Ben Dugan <[email protected]>
Newsgroups gmane.comp.hardware.microcontrollers.gnupic
Message-ID <[email protected]>
I recently posted a question about passing things like "==" to macros; 
this is in the context of trying to get Brad Minch's 18F2455 usb code to 
work under gpasm.  I didn't get a real solution to that, but did find a 
work-around that is satisafactory for my needs.  I do think there is a 
significant difference on that score between mpasm and gpasm macro 
processing, though.

Now I have a new issue: It seems to me that there is no way to have more 
than one #v(expression) occurence in  a single macro line.  For 
instance, if you wanted a line within a macro like:

   goto label#v(row)_#v(column)

(where there are labels defined somewhere else such as label1_1, 
label1_2, label2_1, label2_2)

This will generate syntax errors, as far as I've been able to tell.

I've tried to work around this but have not figured out a fix.  So I 
started to look into the gpasm source code, which I am not particularly 
qualified to do!

Does anyone have a clever suggestion for a workaround, or do the 
developers have any pointers about how I might, for example, tweak 
scan.l to do this?  (I was thinking a brute force approach might be to 
add a #w(expression) "operator", but that's not very good.)

Ben
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.