Re: a newbie's dumb question...

James Grosbach <james.grosbach@microchip.com>
30 Jul 2001 01:24:05 -0400

          From comp.compilers

Related articles
a newbie's dumb question... explosion78@hotmail.com (2001-07-18)
Re: a newbie's dumb question... kvinay@ip.eth.net (Vinay Kakade) (2001-07-23)
Re: a newbie's dumb question... joachim_d@gmx.de (Joachim Durchholz) (2001-07-23)
Re: a newbie's dumb question... haberg@matematik.su.se (2001-07-23)
Re: a newbie's dumb question... hirner@yahoo.com (ThaFacka) (2001-07-23)
Re: a newbie's dumb question... rkrayhawk@aol.com (2001-07-27)
Re: a newbie's dumb question... james.grosbach@microchip.com (James Grosbach) (2001-07-30)
| List of all articles for this month |
From: James Grosbach <james.grosbach@microchip.com>
Newsgroups: comp.compilers
Date: 30 Jul 2001 01:24:05 -0400
Organization: Compilers Central
References: 01-07-124 01-07-144
Keywords: assembler
Posted-Date: 30 Jul 2001 01:24:05 EDT

On Fri, Jul 27, 2001 at 02:53:33AM -0400, RKRayhawk wrote:
> In all probability you can legitimately impose a
> single-line-single-instruction requirement on the source code, and
> then accept about four basic line patterns:
>
> blank lines
> comment only lines
> lines with commands only
> lines with command and comments.


With bare PIC assembly, there really aren't any places where a line
feed in required to be anything other than whitespace to a parser.
On the other hand, when trying to parse MPASM (Microchip's assembler)
directives and things like that, there are a few places where line
feeds are significant (labels, for example). There are also quite a
few places where MPASM requires some rather interesting lexer/parser
hacks to get things working properly.


Note that it's the 16, 17, and 18 architectures' assembly languages
that I'm referring to here. The new dsPIC architecture requires a
bit more work from an assembler.


You may also want to check out the GNUPIC project (www.gnupic.org)
which has as a sub-project gpasm, a GPL PIC assembler which is
relatively feature-complete. There are a variety of other goodies
available from the site as well. Also check out www.dattalo.com,
the home page of the author and maintainer of the gpsim simulator.


Regards,
  Jim Grosbach




--
James Grosbach
Principal Compiler Engineer
Microchip Technology


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.