Re: a newbie's dumb question...

James Grosbach <>
30 Jul 2001 01:24:05 -0400

          From comp.compilers

Related articles
a newbie's dumb question... (2001-07-18)
Re: a newbie's dumb question... (Vinay Kakade) (2001-07-23)
Re: a newbie's dumb question... (Joachim Durchholz) (2001-07-23)
Re: a newbie's dumb question... (2001-07-23)
Re: a newbie's dumb question... (ThaFacka) (2001-07-23)
Re: a newbie's dumb question... (2001-07-27)
Re: a newbie's dumb question... (James Grosbach) (2001-07-30)
| List of all articles for this month |

From: James Grosbach <>
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 (
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,
the home page of the author and maintainer of the gpsim simulator.

  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.