gnupic: MACRO expanding with gpasm
Subject:
Re: MACRO expanding with gpasm
From:
Frederic ####@####.####
Date:
19 Nov 2001 07:36:56 -0000
Message-Id: <0111190836410I.05384@sunceng>
On Saturday 17 November 2001 01:48, Craig Franklin wrote:
> When a macro is defined gpasm parses and stores it. Each time the macro
> is invoked this parsed structure is feed to opcode generator. This
> works fine for most macros, but it has some problems. Your example
> demonstrates the most common one.
Ok.
> These problems can be solved by storing the macro as text. The text is
> then injected into the first gpasm input stage, the lexer. This method
> resolves all of these problems.
How do you 'store macro as text' ? What is the syntax for the BIT macro
example ?
BIT MACRO label,bit,file ;Define a bit label
label EQU file<<8|bit ;(macro)
ENDM ;
Can you explain how gpasm exactly work when it parses the source code ?
What are the differents phases (lexer, etc...) ?
> I have had this basically working for over a month, but I haven't had
> time to fix the last few bugs. I will try to find the time and get it
> fixed.
Thank you for your help,
--
Frederic
http://perso.wanadoo.fr/biloba