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


Previous by date: 7 Sep 2005 14:35:54 +0100 Re: [gnupic] [PIC] Mini Howto: Microchip tools under Linux with Wine, Ben Dugan
Next by date: 7 Sep 2005 14:35:54 +0100 Re: [gnupic] RE: gpasm question, Ben Dugan
Previous in thread:
Next in thread:

Subject: More than one #v(expression) in a single line of a macro
From: Ben Dugan ####@####.####
Date: 7 Sep 2005 14:35:54 +0100
Message-Id: <431EECB4.3050105@curdes.com>

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




Previous by date: 7 Sep 2005 14:35:54 +0100 Re: [gnupic] [PIC] Mini Howto: Microchip tools under Linux with Wine, Ben Dugan
Next by date: 7 Sep 2005 14:35:54 +0100 Re: [gnupic] RE: gpasm question, Ben Dugan
Previous in thread:
Next in thread:


Powered by ezmlm-browse 0.20.