gnupic: Trouble with macros conditionally generating code


Previous by date: 19 Nov 2004 17:14:28 +0000 Re: Trouble with macros conditionally generating code, Mark Rages
Next by date: 19 Nov 2004 17:14:28 +0000 Re: Trouble with macros conditionally generating code, Marco Pantaleoni
Previous in thread: 19 Nov 2004 17:14:28 +0000 Re: Trouble with macros conditionally generating code, Mark Rages
Next in thread: 19 Nov 2004 17:14:28 +0000 Re: Trouble with macros conditionally generating code, Marco Pantaleoni

Subject: Re: Trouble with macros conditionally generating code
From: Pete Elmore ####@####.####
Date: 19 Nov 2004 17:14:28 +0000
Message-Id: <419E2A29.2020206@petta-tech.com>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1



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

This page only describes various memory-paging techniques; my issue was
(as the subject line says) that macros generating a variable number of
instructions mess up forward labels.  (Paging was just what I was doing
with the macros.)  This seems to be "working as designed", so, not
making an issue of the design, I think the relevant problem is that the
error message in this case is very cryptic.  Had I not known that the
macro was the cause of the problem, it could have taken a very long time
to figure this out.

On a side note, the same error message occurs for this:
ex.s:
~ processor 16f877
bad_label:
~        nop
bad_label:
~        nop
~ end
EOF

$ gpasm ex.s
ex.s:4:Error [116] Value of symbol "bad_label" differs on second pass
~ pass 1=0,  pass 2=1

Perhaps a 'label "bad_label" redefined' error that gives the user line
numbers for both definitions would be more appropriate?

Also, I'd like to thank everyone for the helpful responses!
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
Comment: Using GnuPG with Debian - http://enigmail.mozdev.org

iD8DBQFBniopv24lB609Ih8RAo0VAKC5VyRmUr+jS5dItxPbLpDCJEHHPwCeLwYY
PCNZzZ31xaDvD7FvY3CcLkk=
=SPqF
-----END PGP SIGNATURE-----

Previous by date: 19 Nov 2004 17:14:28 +0000 Re: Trouble with macros conditionally generating code, Mark Rages
Next by date: 19 Nov 2004 17:14:28 +0000 Re: Trouble with macros conditionally generating code, Marco Pantaleoni
Previous in thread: 19 Nov 2004 17:14:28 +0000 Re: Trouble with macros conditionally generating code, Mark Rages
Next in thread: 19 Nov 2004 17:14:28 +0000 Re: Trouble with macros conditionally generating code, Marco Pantaleoni


Powered by ezmlm-browse 0.20.