I've been thinking, MASM (Macro Assembler) supports Macros, does NASM (Netwide Assembler ?) support macros?

I also read somewhere that NASM is utilized for both win and linux assembly programs, does that simply mean that there are compilators both for win and linux that 'speak' these variations?

Can anyone tell me the differences (and similarities) between MASM, NASM?
Posted on 2002-07-12 07:12:35 by scientica
NASM does have macros (not as powerful as MASM's, imho). With NASM you have to specify instruction operand sizing more explicitly. This is good because you get what you want. This is bad because you have to always say what you want. NASM is a work in progress, whereas MASM bugs are fairly well known. If your developing for otherthan Windows x86 then NASM is good because the source code is availible, but it is a mess. FASM source code is availible, too (also a mess).
Posted on 2002-07-12 07:56:22 by bitRAKE
BitRAKE,
I know that the choose of an assembler is a matter of taste and this thread would be better included in "The Crusades" but "mess" for the source code of FASM is not the proper term (or there is another mean of "mess" that I "miss"?) :(
Posted on 2002-07-16 04:04:17 by pelaillo
Really? Where can we get this FASM source?
Posted on 2002-07-16 05:10:41 by ThoughtCriminal
Posted on 2002-07-16 06:01:51 by bazik

BitRAKE,
I know that the choose of an assembler is a matter of taste and this thread would be better included in "The Crusades" but "mess" for the source code of FASM is not the proper term (or there is another mean of "mess" that I "miss"?) :(
You are correct - I should have said that they both are difficult to make changes to. The NASM source is a mess in many ways. :) Many people have worked on it with different ideas of what it should be. FASM is comparatively new and Privalov is still working on it himself. This doesn't leave a great deal of time to document. RadASM is in a similar situation. This is not a negitive towards either author - they are great coders. For RadASM and FASM it is a natural part of the process for a popular program that is growing, imho.
Posted on 2002-07-16 07:23:32 by bitRAKE
Problem is, that there is no standard available, how to format your code / write it. (and this is a good thing! I hate to follow standards :) )
For example, bitRAKE uses a lot of macros and MMX code ( :) ).
I neither use MMX nor Macros.

Another important point is, that some coders have the same "bad thing" as I have: They don't comment their code :)

Posted on 2002-07-16 07:29:07 by bazik
Posted on 2002-07-16 07:45:15 by bitRAKE
Darn, you got me :(


Serious, I would really like to use some MMX stuff, but I don't have the time to learn it :/
And I really didn't need it yet, because I could do everything in "normal" assembly (maybe because I don't do DirectX stuff :P )
Posted on 2002-07-16 07:47:14 by bazik
I think that the assembler is a very important part of the whole thing when you program in assembly language. This is true expecially when you do advanced stuff.

When I migrated to x86, I began with GEMA, TASM and MASM.. I preferred TASM a bit more than MASM.

When doing something "tricky", none of them was anything that I could consider "satisfactory" though, but I didn't bother, since I was anyway porting my own Amiga programming language/compiler and source_level_debugger to the PC. But for contract reasons, I were/am asked to produce C/C++ and sometimes asm routines and to hand over the complete source code that must seamlessly assemble with the assembler I specify, to produce the .OBJ file that I also hand over (or DLL). So I was/am still interested into standard assemblers.

Finally NASM came.. what a great improvement it was, I thought. Still, it wasn't perfect at all, in some regards.

And here comes FASM, which in its latest incarnations is the very best assembler the x86 ever had. I will never get tired to testimony this.

bitRAKE: true, you spend your time either programming or writing documentation for your program. If I had to choose, I'd choose to program, rather than to document. Privalov is extremely committed, which if you consider that FASM is freeware, is truly an impressive and respectable thing. As far as I know he's definitely writing extended PDF documentation for the next release of FASM, the 1.40. So even this hole should be filled.

I wish everybody here finally made a serious test to FASM 1.40 when it will be out.. you will regret to have done it so late, and hopefully it will become the standard here, so we'll stop posting incompatible pieces of sourcecode.. the x86 is a true mess when it comes to standard assemblers.

The latest FASM is definitely the best x86 assembler out there. It's about time that somebody supports it also by converting all those Iczelion-style tutorials and WINDOWS include files, so also beginners may benefit from it. I do DirectX stuff on FASM with no problem at all, as well as any Win32 API stuff, so for me MASM has never been an option. Yet I feel MASM so limiting.. FASM is truly another world when you do advanced stuff, and it outputs the code that you want, not that one that it feels to (I hate this obscure MASM behaviour).

And being the source code extremely readable or just not it doesn't matter when not only it's available, but Privalov is so much committed to improving it every day. When has it been the latest major new release of TASM, NASM or MASM? How many years ago?

Gimme FASM everyday..

I very rarely have such good words for a standard (meant only in the sense of "publicly available") programming tool, I'm used++ to make my own ones because I'm so "picky" and perfectionist. If I was the author of FASM I'd be proud. If it's a x86 assembler that you're looking for, IMHO FASM is the very best.

IMHO only a 1:1 porting of the Amiga's AsmOne could be a better assembler.. but here we're talking about a different kind of tool that anyway has never existed on the x86 platform.

So, wait for the 1.40 release of FASM (with finally the extended documentation), and finally get rid of that MASM/TASM/NASM thing, you'll never regret you did it.
Posted on 2002-07-16 09:04:28 by Maverick
/me already uses FASM :)

I just need to learn more about the FASM specific flags you can
put in the source code... this declaration of sections for example :/

If I have some time this week, I will convert the GTK source, vecna posted here to FASM. So we will have a GUI example under Linux, made with FASM :rolleyes:
Posted on 2002-07-16 09:12:12 by bazik
I too myself have started FASM. I'm predicting MASM will be like TASM in the future. I hope not!!!

Lately, there's a request from the TASM newsgroup to Borland, to make TASM open source. So, if Borland does make TASM open source(which I doubt it). I would love to switch back to TASM. ;)

We can always bombard borland with emails, snail mails, phone calls, FAX ... to pressure them to make TASM open source. ;)
Posted on 2002-07-16 09:48:38 by stryker

We can always bombard borland with emails, snail mails, phone calls, FAX ... to pressure them to make TASM open source. ;)
Post an email address so we can all hit the same spot. :tongue:
Posted on 2002-07-16 09:54:10 by bitRAKE
There's some emails posted here http://groups.google.com/groups?dq=&hl=en&lr=&ie=UTF-8&threadm=MPG.179b7cc75f8f13598db6c%40207.105.83.65&prev=/groups%3Fhl%3Den%26lr%3D%26ie%3DUTF-8%26group%3Dborland.public.tasm :)

::edit::
To answer the question of the differences between the MASM and NASM? The first letter of the words MASM and NASM should hint what's the difference. :grin: -> flame me, flame me :grin:
Posted on 2002-07-16 10:46:23 by stryker
Originally posted by stryker
::edit::
To answer the question of the differences between the MASM and NASM? The first letter of the words MASM and NASM should hint what's the difference. :grin: -> flame me, flame me :grin:


Posted on 2002-07-16 11:34:37 by scientica
Maverick, I completely agree with you - FASM is in a whole different league than MASM, TASM. NASM, SpASM. Yes, Tomasz has created a very high quality tool, freely availible to all. I have much respect for him and would pay for FASM if that is what it takes to keep it going. MASM's days are numbered - for me and everyone else. This is not a bad thing - it is the start of something new. Personally, I need to program at several abstraction layers at the same time without loss of performance. If I am far too harsh in my critizism of FASM, it is only because I like it so. ;)
Posted on 2002-07-16 22:51:15 by bitRAKE
When FASM has debugging info, I'm switching from MASM.
Posted on 2002-07-16 23:19:05 by ThoughtCriminal
Maverick, I like it when you defend a cause that you find interesting, it can be felt the enthusiasm coming out of the monitor, that's why I knew you had to be italian or meridional, the passion of your arguments.
But let?s give credit to the great wizard that coded FASM:

flat assembler version 1.31
Copyright (c) 1999-2002, Tomasz Grysztar
All rights reserved.

This is the version that I?m using, and I?m also waiting forward to v. 1.4. It?s great having the sources... it should be a "conditio sine qua non" of programming etiquette.
At least of "high" programming, that is, Operating Systems, Compilars, Kernels, and all that stuff. With the other stuff... well, I guess anyway lusers don?t really care about the code of their M$ Office or whatever, and I think Billy has kids to bring up.

By the way, Maverick, who is this "Privalov" you talk about?
Posted on 2002-07-17 11:17:42 by slop

By the way, Maverick, who is this "Privalov" you talk about?
Privalov is Tomasz Grysztar. :)
Posted on 2002-07-17 11:40:08 by bitRAKE
Thank you bitRAKE, somedays I think I was born with only half a brain ;)
Posted on 2002-07-17 11:42:53 by slop