gnupic: Re: [gnupic] gpasm macros/defines
Subject:
Re: [gnupic] gpasm macros/defines
From:
"David Barnett" ####@####.####
Date:
20 Nov 2006 14:18:12 +0000
Message-Id: <003201c70cae$a5af2430$0401a8c0@barnett2>
----- Original Message -----
From: "Scott Dattalo" ####@####.####
To: ####@####.####
Sent: Saturday, November 18, 2006 9:23 PM
Subject: Re: [gnupic] gpasm macros/defines
> On Fri, 2006-11-17 at 16:46 -0600, David Barnett wrote:
>
>> I thought I had a workaround for this define/arg expansion problem:
>> START1 MACRO X
>> #define OP1 movlw X
>> ENDM
>> ...
>> START1 5
>> OP1 ; gpasm reports "symbol not previously defined (X)."
>> but it turns out there are problems with it, too. I'm getting kinda
>> desperate for advice here. Scott, have you gotten in deep enough with
>> gputils to know anything about this?
>
> David,
>
> I'm not as familiar with gpasm as I once was. Craig has made major
> improvements and changes to it since I last looked.
I feared as much. It looks like Craig has been out of the loop for almost a
year.
> However, your original problem stemmed from a 'pagesel $' problem. Was
> this for relocatable or non-relocatable code? I've had issues with the
> '$'
> operator in relocatable code. Also, I've had difficulty with label
> arithmetic in relocatable code. Finally, do you know if the offending
> code works with MPASM?
The 'pagesel $' problem was with relocatable code. I made some discoveries
on that and there was a message (Re: "pagesel $" dup error) about it on
11/17 where I explained exactly what the problem is; it sounds like you
might not have seen it.
Both the problem above and the '$' problem work on MPASM. For the
macro/define problem that's half of my trouble since I'm trying to port from
MPLAB to gputils. I can work around the '$' problem pretty easily (with a
"here" label), but after hours of playing around with it I still haven't
found any workaround for the macro/define order of substitutions.
David