FASM and NASM -- differences

What are the differences between Nasm and Fasm except the fact that Fasm is faster and itself if written in assembly?
What about the instruction set?
And also which one is more popular?
Why do you personally use FASM? or NASM.

Re: FASM and NASM -- differences

jorido wrote:

And also which one is more popular?

From what I can tell, NASM seems to get more attention among FOSS people; the Ubuntu package repositories have packages for NASM but not for FASM, for instance. I'm not entirely sure why it's more popular though.

Re: FASM and NASM -- differences

Trinitek wrote:

From what I can tell, NASM seems to get more attention among FOSS people; the Ubuntu package repositories have packages for NASM but not for FASM, for instance. I'm not entirely sure why it's more popular though.

Maybe because it uses the C compiler so naturally it is "easier" for them.

NASM and even MASM have been deeply cultured in colleges for long, so that explains their popularity. They receive continuous support from academia. FASM is missing that entry point despite of it having a more powerful macro engine and cleaner design. So in the future, expect FASM to be a 'specialist' assembler intended to be used by more experienced programmers. Unless TG is willing to invest more in educational part of FASM, it will stay that way for good.

Re: FASM and NASM -- differences

jorido wrote:

Why do you personally use FASM? or NASM.

What makes the obvious differences are the culture of people around it and the approach to the problem at hand. Syntax makes little differences (not the macro though. Macro makes huge differences). 'Culture' can be seen from their respective discussion boards.

That doesn't mean that a 'culture' is not capable of what the others can do. It's just that they have this recognizable tendencies. In all 3 cultures, in-fighting among the peasants are quite common. HAHAHA

I hate stackoverflow. One fine day, I gave a funny response to a guy in Networking section about his problems with some 'walls' and 'noise'. I recommended to him to use "whispering" instead to solve it. I got 10 downvotes for that reply. I got another 3 downvotes for explaining in my next post that it was a joke. I quit stackoverflow right away

That's not true. YASM is included in repositories and some projects even require it for "asm optimizations" on Linux. And it has BSD license.

Anyway I couldn't care less about repositories, I prefer to get the app directly from the author's site (like FASM), unless the app I download needs a hellish dependency chain, that's the only thing package managers are good for.

FASM doesn't though. I'm kinda sick of so many libraries for every little thing creating so many dependencies (even when compiling open source stuff), especially because the idiot library developers in the Linux world just absolutely love to deprecate/break backward compatibility so many times. You'd think after ONE backward compatibility break they'd learn to design them future-proof, but nah, who cares of users, their stupid code needs to be "just perfect". (contrast that with the kernel which never breaks backward compatibility with userland code, and Linus is a fierce advocate of this, that's why I respect him so much -- it's a reason I use Wine for alot of apps on Linux and prefer them to native, lol, because Wine's interface being Win32 always has backwards compatibility, so only Wine has to be recompiled to support the "breaking compatibility system libraries", not all my fucking apps!)

This is very true. I myself chose fasm when I started learning osdev because it was very friendly to plain binary output, what other assemblers lacked much; for its self-sufficiency and speed. Enjoyin fasm since then (although I never comprehended its rich macros and it's a shame)

How about macroses in FASM? There're so many of them and they're difficult. And they aren't related to knowledge of Assembly, whereas one programming in FASM has to learn them anyway. One can become better in Assembly by using marcoses by programming in NASM, but does that mean that he's really become better in Assembly in general? Without macroses?

I mean, macroses are like a framework: one can be good at creating software using a framework, but he only understands the process in a high level, with that framework, and not what's going on under the hood. Take away that framework and he's unable to do programming anymore.

I think In NASM the macro system is less powerful, much smaller and less complex and that's good. What do you think?

It is, but macros aren't framework. They're helpers to do routine things more quickly and conveniently.

For instance, you can do

Code:

myProc:pushebp
movebp, esp
...
movesp, ebp
popebp
ret

each time. But you can make it more convenient with a single-line macro.
A more useful example: struct macros. I cant' imagine life without structures

jorido wrote:

I think In NASM the macro system is less powerful, much smaller and less complex and that's good. What do you think?

No, it's not better. The more powerful and flexible macro engine is, the more you can do. You know, you can create such things as .iso or .fat32 images with fasm. With less powerful and smaller macros you would require third-party utils for this. Differrent sets of utils if you develop on multiple platforms, etc.

Macros are not framework. Nobody forces you to use macros if you don't want to, and you will still be able to accomplish what you want. It could just take a bit more effort and won't be that attractive (I myself use only struct macro and it's enough for me)

@jorido Macro in FASM doesn't really fit the definition of macros in NASM and / or MASM. FASM macros systems go beyond that. It can create something out of nothing. For example, FASMG is a macro systems totally independant of CPU/processors and can provide emulations to both hardware and software. This goes with the FASM culture I mentioned above - compiler writing, and add to it instruction emulations of other architecture (AVR, Java byte code, 8051 etc). FASM macro language is huge and expanding.

@Trinitek FASM isn't a GNU/GPL-related licence. So it can not be included in any Linux repositories for distributions just like people do with NASM.

I don't see a clause in the FASM license that prevents its inclusion. Is it excluded out of principle of being GPL incompatible?

Exposing FASM to GNU environment will allow people to create "forks". Forks and friends may not be healthy for FASM which is very strict in its design principles. I don't think any kind of "forks" can offer anything of value to both FASM and GNU community. FASM is non-POSIX anyway.

Well assemblers are not popular in C-land. They only exist as a necessity to allow the C-compiler to generate binaries. Plus fasm doesn't support the "lovely" AT&T syntax, so many in C-land will reject it simply based upon that.

But, whatever, I don't care if C-land love it or hate it. That is their problem, not mine.

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot vote in polls in this forumYou cannot attach files in this forumYou can download files in this forum