flat assembler
Message board for the users of flat assembler.

Index > Compiler Internals > not a bug, but ...

Author
Thread Post new topic Reply to topic
mrpink



Joined: 03 Jun 2005
Posts: 27
Location: Germany
mrpink
Fasm has no include cycle dectection, thus if such a cycle exists, you
will probably always run out of memory.

Unfortunately it is not possible to conditionally include files, since the
preprocessor doesn't evaluate such conditionals. So if you write
something like

_WINDOWS_INC_ equ 1

IF NOT DEFINED _WINDOWS_INC_
include "incfile.inc"
END IF

the preprocessor would include the file despite the false condition.
This seems to be a waste of memory and time since at the stage of
evaluation of this conditional expression, the evaluator has to find
the dangling END IF and therefore has to process the hole "incfile.inc"
content.
Post 03 Jun 2005, 12:24
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 7725
Location: Kraków, Poland
Tomasz Grysztar
Some solutions were provided here.
Also please read the Design Principles article (section 4) to see why fasm's IF works this way. However I'm planning to add some IF-like directive processed by preprocessor instead of assembler in the near future.
Post 03 Jun 2005, 12:32
View user's profile Send private message Visit poster's website 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.