flat assembler
Message board for the users of flat assembler.

Index > Main > output fasm's preprocessor passes to text file

Author
Thread Post new topic Reply to topic
khanh1984



Joined: 13 Jul 2009
Posts: 17
khanh1984
Dear Tomasz

Do Fasm supports output the result of preprocessor passes to readable human text file ? Such as if fasm produces 4 passes to complete compiling source code file then it will produce 4 texts with the content of indivisual passes. Sometimes I think I can understand Fasm better if I can see the result of every steps that Fasm makes.
Post 23 Jul 2009, 06:49
View user's profile Send private message Reply with quote
narada



Joined: 15 Feb 2008
Posts: 77
Location: Ukraine, Dnepropetrovsk
narada
P.S. & BTW: Tomasz - it's like TomasZ == ASCII-Z ??? )))
Post 23 Jul 2009, 07:57
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
khanh1984



Joined: 13 Jul 2009
Posts: 17
khanh1984
Narada, what are you trying to say?
Post 24 Jul 2009, 07:24
View user's profile Send private message Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid
khanh: FASM can't do this right now. But how exactly do you imagine that output to look like. Can you give as an example of such output?
Post 24 Jul 2009, 10:09
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
LocoDelAssembly
Your code has a bug


Joined: 06 May 2005
Posts: 4633
Location: Argentina
LocoDelAssembly
Note however that there is no such thing as multiple preprocessor passes, preprocessing is always carried in a single pass. It is the assembler stage which may take several passes, however.
Post 24 Jul 2009, 21:15
View user's profile Send private message Reply with quote
neville



Joined: 13 Jul 2008
Posts: 507
Location: New Zealand
neville
khanh1984:
As LocoDA has said it is the assembler module of fasm which performs multiple passes to resolve all variable and address references etc.

Before the assembler is invoked 3 other modules are invoked (if my memory serves me correctly):
- the init_memory module does what it says
- the preprocessor module translates the source text into a standard form and expands all macros etc
- the parser module tokenises the preprocessor output for more efficient assembly

You can see all this by examining the fasm sources, and then you could modify the sources to produce whatever extra output you want.

I have modified fasm to run in my own operating system (see also http://board.flatassembler.net/topic.php?t=9483) and integrated it into my own memory-based IDE. You can view all the intermediate results produced by fasm (preprocessor output etc) from within my IDE.

_________________
FAMOS - the first memory operating system
Post 25 Jul 2009, 02:23
View user's profile Send private message Visit poster's website Reply with quote
khanh1984



Joined: 13 Jul 2009
Posts: 17
khanh1984
Sorry 'cause I really got confused.
so the preprocessor is done in 1 stage. However, in manual when refering to backslash \. It states that in preprocessor, the backslash is removed and that is all it does. So I guess the preprocessor also does some forward and backward resolving all directives. What I want is to observe the translation of preprocessor each time it suceeds resolving one macro, one structure... or any directives. Maybe too much requests but is it possible ? or more easily, output the preprocessor'stage (before passing to assembly'stage)
Post 27 Jul 2009, 02:51
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on YouTube, Twitter.

Website powered by rwasa.