gnupic: Trouble with macros conditionally generating code


Previous by date: 19 Nov 2004 15:57:53 +0000 Re: Trouble with macros conditionally generating code, nisma.gmx.net
Next by date: 19 Nov 2004 15:57:53 +0000 Re: Trouble with macros conditionally generating code, Pete Elmore
Previous in thread: 19 Nov 2004 15:57:53 +0000 Re: Trouble with macros conditionally generating code, nisma.gmx.net
Next in thread: 19 Nov 2004 15:57:53 +0000 Re: Trouble with macros conditionally generating code, Pete Elmore

Subject: Re: Trouble with macros conditionally generating code
From: Mark Rages ####@####.####
Date: 19 Nov 2004 15:57:53 +0000
Message-Id: <74ee72ca04111907576c9046e8@mail.gmail.com>

How does gpasm compare to mpasm in this? See
http://www.piclist.com/techref/microchip/pages.htm

Regards,
Mark


On Fri, 19 Nov 2004 11:01:06 +0100, Marco Pantaleoni
####@####.#### wrote:
> On Fri, Nov 19, 2004 at 01:43:30AM -0800, Pete Elmore wrote:
> 
> 
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> >
> > | But, doesn't this version produce error 118 ("Error [118] Overwriting
> > | previous address contents.")?
> > | On the second pass, when the assembler overwrite the "nop"s, it should
> > | shout, if I am not wrong.
> > The nops never get overwritten.  It generates either
> >       bxf 0xa, 3
> >       bxf 0xa, 4
> >       call label
> > or
> >       nop
> >       nop
> >       call label
> 
> Yes, but if the assembler produces different code in the two passes
> as I suspect, it *will* overwrite the nops (and I've tried, and I
> effectively get the Error 118).
> I'd like to know if you don't get the error and why, if you put the
> nops.
> Just trying to understand what happens here, and if my understanding
> of gpasm and macros are correct.
> 
> > It's harmless to set the bits if you don't need it, although it adds
> > unnecessary instructions.
> 
> This makes sense, I think I'll do the same (why use nop, if setting
> page selection bits is equally expensive? :-). But the second pass
> problem remains.
> 
> > I was going to do something like this, but the documentation for gpasm
> > says that pagesel changes pages with movlw and movwf, and I wanted to
> > avoid altering W (a few routines I wrote near the beginning of the
> 
> yikes! That explains a lot of things... :-)
> I should have read more carefully that document....
> Good to know, thanks :-)
> 
> 
> 
> --
> ========================================================================
> Marco Pantaleoni                                  ####@####.####
> Padova, Italy
> elastiC language developer                   http://www.elasticworld.org
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ####@####.####
> For additional commands, e-mail: ####@####.####
> 
>

Previous by date: 19 Nov 2004 15:57:53 +0000 Re: Trouble with macros conditionally generating code, nisma.gmx.net
Next by date: 19 Nov 2004 15:57:53 +0000 Re: Trouble with macros conditionally generating code, Pete Elmore
Previous in thread: 19 Nov 2004 15:57:53 +0000 Re: Trouble with macros conditionally generating code, nisma.gmx.net
Next in thread: 19 Nov 2004 15:57:53 +0000 Re: Trouble with macros conditionally generating code, Pete Elmore


Powered by ezmlm-browse 0.20.