« Return to Thread: SPASM - a MPASM behave alike

Re: SPASM - a MPASM behave alike

by Xiaofan Chen :: Rate this Message:

Reply to Author | View in Thread

On Sun, Jun 7, 2009 at 2:57 PM, Peter Keller<psilord@...> 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

---------------------------------------------------------------------
To unsubscribe, e-mail: gnupic-unsubscribe@...
For additional commands, e-mail: gnupic-help@...

 « Return to Thread: SPASM - a MPASM behave alike