gnupic: Re: [gnupic] Possible gpasm or gplink bug?


Previous by date: 14 Nov 2005 01:05:11 +0000 Re: [gnupic] Possible gpasm or gplink bug?, Chen Xiao Fan
Next by date: 14 Nov 2005 01:05:11 +0000 Re: [gnupic] Re: MCHPFSUSB AN950, AN956, ..., Chen Xiao Fan
Previous in thread: 14 Nov 2005 01:05:11 +0000 Re: [gnupic] Possible gpasm or gplink bug?, Chen Xiao Fan
Next in thread: 14 Nov 2005 01:05:11 +0000 Re: [gnupic] Possible gpasm or gplink bug?, Julian Green

Subject: RE: [gnupic] Possible gpasm or gplink bug?
From: "Scott Dattalo" ####@####.####
Date: 14 Nov 2005 01:05:11 +0000
Message-Id: <61132.71.139.49.133.1131930304.squirrel@71.139.49.133>

On Mon, 2005-11-14 at 08:48 +0800, Chen Xiao Fan wrote:
>From: Julian Green
> >Sent: Saturday, November 12, 2005 9:28 PM
> >To: ####@####.####
> >Subject: [gnupic] Possible gpasm or gplink bug?
>
> >The code Im doing is fairly simple:
> >
> >    movlw  msg_to
>
> Wait a moment, msg_to should be a literal here.

No, Julian wants to get the offset into a string. In C he would write:

    &msg_to[RxState]

In my opinion, Julian's example typifies a general problem with
relocatable code; RAM variable addresses can't be accessed at assembly
time. The one I hate is for overlaying temporaries. In the old days you
could write:

MeaningfulNameForALocalVariable EQU temp1

This doesn't work for relocatable code (at least with gpasm and gplink)
because the EQU (and SET) are not typed. Thus the EQU applies only at
assembly time and what you want is an EQU that operates at link time.
Maybe Olin's prepic macros address this issue, but I don't know. Or maybe
there's a way other than udata_ovr to deal with this issue (and I don't
know that either).

Scott

Previous by date: 14 Nov 2005 01:05:11 +0000 Re: [gnupic] Possible gpasm or gplink bug?, Chen Xiao Fan
Next by date: 14 Nov 2005 01:05:11 +0000 Re: [gnupic] Re: MCHPFSUSB AN950, AN956, ..., Chen Xiao Fan
Previous in thread: 14 Nov 2005 01:05:11 +0000 Re: [gnupic] Possible gpasm or gplink bug?, Chen Xiao Fan
Next in thread: 14 Nov 2005 01:05:11 +0000 Re: [gnupic] Possible gpasm or gplink bug?, Julian Green


Powered by ezmlm-browse 0.20.