gnupic: Re: [gnupic] SPASM - a MPASM behave alike
Subject:
Re: [gnupic] SPASM - a MPASM behave alike
From:
Xiaofan Chen ####@####.####
Date:
7 Jun 2009 07:36:38 -0000
Message-Id: <a276da400906070036l601ff059nf7a19a88351b3825@mail.gmail.com>
On Sun, Jun 7, 2009 at 2:57 PM, Peter ####@####.#### wrote:
> On Sat, Jun 06, 2009 at 08:20:57PM -0400, David Barnett wrote:
>> The problem with gpasm's "two pass" system is that it's sloppy about how it
>> does the substitutions, and it does too much in the lexer. That makes it
>> nearly impossible to do some things we need. For instance, if the
>> indentation is wrong in the assembler syntax, gpasm gets completely tripped
>> up and gives very strange errors because the lexer has to assume that
>> anything in column 1 is a directive or label, without checking whether it
>> corresponds to an opcode instead.
>
> What would the challenges be in writing a completely standalone
> preprocessor which just emits the processed assembly to be then fed
> into gpasm?
>
One of the example is here. It is a very comprehensive assembler
environment in its own right with a large amount of macros.
http://www.embedinc.com/pic/
It has aspic_fix, the formater.
http://www.embedinc.com/pic/aspic_fix.txt.htm
It also has the pre-processor for the macros.
http://www.embedinc.com/pic/prepic.txt.htm
All the source codes (in Pascal) are here:
http://www.embedinc.com/pic/dload.htm
http://www.embedinc.com/pic/install_public_source.exe
--
Xiaofan http://mcuee.blogspot.com