The first beta of fasm 1.41 is officially available to download from and Please test it and report, final version coming soon, when I finish (at least) the second chapter of documentation (only few pages left). Then I plan to begin working on tutorials.
Posted on 2002-10-15 05:55:16 by Tomasz Grysztar

Could you add a Network Byte Order data definitions? Maybe call them nw, nd, etc. I've tried using macros with only partial success.

Maybe a more generic version of rva. Then the byte order of anything could be swapped.

Secondly, I would like a way to conditionally include a file. The condition I need is to know whether a symbol is used, but hasn't been defined. That would allow me to use load a source code (static) library function if it was need by my program.

Posted on 2002-10-16 00:41:05 by eet_1024
The second beta is available now, I have finally added the text version of the latest documentation.

As for the network byte order, I believe nw and nd can be defined as macros, with use of the virtual and load directives.
And about conditions whether something was used/defined - I was planning to add somthing like that, but it's still at early stage. I'll let you know here when I do something more about it.

I've also started writing the DOS tutorial, please be patient... ;)
Posted on 2002-10-23 13:10:02 by Tomasz Grysztar
Opps, for some reason I thought rva reversed the byte order.

I was able to create nw and nd macros with virtual and load. Thanks.

Though I could go for a rbo directive, then I could:

Mixed_Orders dd 5, rbo 66, 777
db rbo "Hello :)"
Posted on 2002-10-24 01:16:23 by eet_1024
Just finished the beta 3. It has added two special operators for logical expressions: "defined" and "used". First checks (of course!) whether the given symbol was defined earlier and second checks whether the given symbol is used somewhere in your source. So the check you needed can be done this way:

if ~defined symbol & used symbol
include ''
end if

Also, the "used" operator allowed me to again improve the import macros, so only used libraries and functions are referred there:

macro library [name,string]
{ forward
local _label
if ~ needed#name
dd 0,0,0,RVA _label,RVA name
end if
dd 0,0,0,0,0
if ~ needed#name
_label db string,0
end if }

macro import name,[label,string]
{ common
if used label
local _label
label dd RVA _label
end if
if $ > name
needed#name = 0
dd 0
needed#name = 1
end if
if used label
_label dw 0
db string,0
end if }

These new macros are also included in my latest includes pack for Win32 programming, you can find it in the "tools" section of my website now.
Posted on 2002-10-24 15:10:24 by Tomasz Grysztar
Kewl. Now I'll have to build up lib files.
Posted on 2002-10-24 22:14:55 by eet_1024
Hey Privalov! :alright:

I was searching over the web yesterday for a new assembler to try. I've only used TASM before. But suddenly I found this page and tried FASM. It's great man!!! I've never used any assembler as FASM, it's so powerful. And since you release the sources too, we can edit the assembler after our needs. Right? ;)

I'm 100% sure that I will only use FASM from the current date!

Keep on going Privalov! This is a great project... Actually it's a great idea to use this forum to feedback and so too... I am rescued!!! Here I find almost everything I need... Thanks everybody!!!

Note! Sorry my bad english! :cool:

Thanks again! ;)
Posted on 2002-10-26 02:47:55 by POW
Thank you for excellent assembler.

I have one question: when you write FASM do you try to get your gode the smallest possible of the fastest possible or you just conding without any optimiztions? Maybe it is time to stop implement new features for some time and optimize FASM greatly?

And second question I remember only now: maybe it is time to get FASM more standartized. To develop concept(s) on future evolution.

That is all.

Mystically yours, Myst.
Posted on 2002-10-29 16:18:20 by myst
I was optimizing fasm for the 80386 processor, and - because on this processor optimization is the most needed :) - I probably won't change it. I've also done a lot of work to keep it small, so I don't have to use MZ format for the DOS version (because it still fits in 64k even with buffer and stack).
About the second question: what kind of standards do you mean?
Posted on 2002-10-30 01:15:35 by Tomasz Grysztar
1st. size optimization for my mind is, for example:

mov eax,0 -> xor eax,eax

mov edx,0 and eax < 8000h -> cdq

and so on...

2nd. I think it will be more readful to make preprocessor directives start with '%', and assmebler directives with '.'. "standartd" is not right word... mmm... f.e. when you add 'defined' and 'used' operators, why you add operators and not directives 'ifdef' and 'ifusd'. Do you did it according to some line of evolution (e.g.: if add features add it so that it will be most useful in future)?
Posted on 2002-10-30 04:03:40 by myst
Hi Privalov,
FAsm is getting better and better, but I got some problems about the defined directive:
What would be the best way to just define a symbol (i.e. without any content)?

If I do:

MySymbol equ *

FAsm crashes.

If I do:

MySymbol equ ""

The symbol is not defined.

I may do e.g.:

MySymbol equ defined

But is there a cleaner way?


Still, it doesn't work anyway.

if defined MySymbol

end if

The lines of code never get added.
What am I doing wrong? Or is it a bug (maybe present only in beta 4)?
Posted on 2002-10-30 05:32:55 by Maverick
I'll say it once again: the "if" directive is processed at the assembly time, not in the preprocessor. The "macro", "struc" and "equ" definitions are the preprocessor directives and they are no more visible at the assembly time. So, this piece of source:

MySymbol equ *
if defined MySymbol
end if

assembler will see as:

if defined *
end if

And it makes no sense for it. But with this:

MySymbol = 1
if defined MySymbol
end if

everything will be fine. Even when during some passes MySymbol is defined, and during some other passes isn't, "if" directive will be always processed according to the current status and the passes will be repeated until everything stabilizes (if it doesn't after doing 100 passes, fasm will exit saying "error: code cannot be generated").
This standard of "if" directive makes it much more powerful, than any preprocessor's if could be, because it allows you to check conditions based on values of addresses or code during the assembly, etc.
And the reason why I extended syntax of the logical expression instead of adding "ifdef" and "ifusd" directives is simple: because it allows to check in one line for such complex conditions like:

if (~defined MySymbol & used MySymbol) | $-start>1000h
; ...
end if

All directived blocks of code that end with the "end" followed by the name of directive that started the block are processed at assembly time, while preprocessor's block are enclosed within "{" and "}" characters. it was my "standarization". All data directives are also standarized so they can be labelled, etc.
Posted on 2002-10-30 08:47:03 by Tomasz Grysztar
2 Privalov: It is exactly what I want to hear! :) Now I love not only product, but it's author too. :):):)
Posted on 2002-10-30 12:53:35 by myst