Page 1 of 2

FASM vs. NASM: What's the Difference?

Posted: Fri Sep 04, 2009 4:49 pm
by ClarionCoder51
I've been hearing alot about NASM, lately. There's NASM this and NASM that and "Hey, I use NASM, too!". I ended up using FASM by chance, but I never really compared the two before. What's the difference?

Re: FASM vs. NASM: What's the Difference?

Posted: Sat Sep 05, 2009 12:57 am
by f2
NASM is written in C and supports many object files (ELF, COFF, OMF, MACH-O, AOUT, etc).
FASM is written in assembly, generates ELF / COFF object files, and ELF / PE / MZ executables (NASM needs a linker for generating executables).
NASM and FASM have the same syntax, with some differences.

If you want make an OS in assembly language, FASM is the best choice. Otherwise, if you want make
an OS in C, you should use NASM.

Re: FASM vs. NASM: What's the Difference?

Posted: Sat Sep 05, 2009 4:47 am
by Combuster
I've been reading your latest posts, and I couldn't help noticing that you ask a lot of things that are explained on the wiki, could be found by a forum or google search. And you give the overall impression that either you are lazy, or unable to understand (basic) things on your own.

OS development is hard. Do you have what it takes? because right now I'd say "no".

Re: FASM vs. NASM: What's the Difference?

Posted: Sat Sep 05, 2009 6:19 am
by Dex
Theres lots, but the main ones are, if you are a C programmer that will be moving your OS to C as soon as you can, go for nasm.
If your a 100% ASM Ccoder go with FASM, it was first coded to write OS's with and once you have some basic functions,
eg:
load from disk
write to disk
print
load programs.
It would take less than half a hour to port to your OS, as it was made to be portable.

Re: FASM vs. NASM: What's the Difference?

Posted: Sat Sep 05, 2009 6:30 am
by f2
Dex wrote: if you are a C programmer that will be moving your OS to C as soon as you can, go for nasm.
Or try JWasm. It's written also in C and it's 100% compatible with MASM syntax.
Only MASM bugs aren't supported :D !

Re: FASM vs. NASM: What's the Difference?

Posted: Sat Sep 05, 2009 11:29 am
by xvedejas
I use Fasm and C, they can work just fine together. I don't see anyreason why Nasm is better for working with C, contrary to what others have said. I really like Fasm's macro syntax, and it assembles fast, so it's my choice.

Re: FASM vs. NASM: What's the Difference?

Posted: Sat Sep 05, 2009 11:31 am
by f2
xvedejas wrote:I don't see anyreason why Nasm is better for working with C
Nasm is the most used with C, but IMHO it is not the best assembler.

Re: FASM vs. NASM: What's the Difference?

Posted: Sat Sep 05, 2009 11:59 am
by ClarionCoder51
Combuster wrote:I've been reading your latest posts, and I couldn't help noticing that you ask a lot of things that are explained on the wiki, could be found by a forum or google search. And you give the overall impression that either you are lazy, or unable to understand (basic) things on your own.

OS development is hard. Do you have what it takes? because right now I'd say "no".
Wow. I didn't know somebody could have such an attitude. True, I am lazy, but the wiki is filled with so much stuff that has nothing of actual use to me. As a matter of fact, I read the entire article on the soundblaster 16 and nowhere in that article did I find info on how to implement soundblaster 16.

I didn't become an OS Dev just to be trampled on by some moderator that likes to stalk me on the forum. You are the only member on this forum that I know that has not even bothered answer one of my maany innocent questions. Charge me with flaming if you want, but at least I know there's some descent people out there that can answer questions without insults. I don't think its even legal by the rules to be charged with flaming when you didn't even help.

Re: FASM vs. NASM: What's the Difference?

Posted: Sat Sep 05, 2009 12:56 pm
by Creature
ClarionCoder51 wrote:As a matter of fact, I read the entire article on the soundblaster 16 and nowhere in that article did I find info on how to implement soundblaster 16.
Then you've not looked correctly, and you've made one of the following mistakes:
  • You've taken for granted that you are given information on implementing a specification, whilst specification just give guidelines how hardware works and the OS developer is responsible for the implementation.
  • You didn't read the other wiki pages in the sound category.
  • You forgot to check the additional URL's or links which direct you to the specifications.
  • You forgot that the wiki doesn't provide everything, but if it doesn't, Google can always help you. If that doesn't help, you can always come here.
Obviously there can be a discussion of whether a topic is valid, but I think this is something you could have figured out on your own by simply Googling or visiting the homepages of both assemblers.

PS: Combuster is not 'some moderator', he is 'no moderator' (since not long ago, I believe. Bad pun intented, insult not intended). But moderator or not, I think he has a point.

Re: FASM vs. NASM: What's the Difference?

Posted: Sat Sep 05, 2009 3:48 pm
by pcmattman
I read the entire article on the soundblaster 16 and nowhere in that article did I find info on how to implement soundblaster 16.
See that section at the bottom of that article there, the "Reference Links"? Try clicking on them, perhaps?
but the wiki is filled with so much stuff that has nothing of actual use to me
It has no actual use to you because you're lazy and looking for free code, or for someone else to do the hard work. If you can only depend on having code available or a tutorial around, you simply will not get far in OSDev. You have to be able to do things for yourself, because there won't always be a tutorial or free code available. There's no way around that, whether you like it or not.

With respect to this question, have a look at the NASM and FASM pages on the Wiki, and then try the NASM and FASM websites. It's not that hard.

Re: FASM vs. NASM: What's the Difference?

Posted: Sun Sep 06, 2009 3:06 am
by JamesM
Hi,
ClarionCoder51 wrote:
Combuster wrote:I've been reading your latest posts, and I couldn't help noticing that you ask a lot of things that are explained on the wiki, could be found by a forum or google search. And you give the overall impression that either you are lazy, or unable to understand (basic) things on your own.

OS development is hard. Do you have what it takes? because right now I'd say "no".
Wow. I didn't know somebody could have such an attitude. True, I am lazy, but the wiki is filled with so much stuff that has nothing of actual use to me. As a matter of fact, I read the entire article on the soundblaster 16 and nowhere in that article did I find info on how to implement soundblaster 16.

I didn't become an OS Dev just to be trampled on by some moderator that likes to stalk me on the forum. You are the only member on this forum that I know that has not even bothered answer one of my maany innocent questions. Charge me with flaming if you want, but at least I know there's some descent people out there that can answer questions without insults. I don't think its even legal by the rules to be charged with flaming when you didn't even help.
Combuster flamed you for several reasons, all outlined in his post. You will find no sympathy from myself or any other regulars for being lazy. A simple google search, as Combuster pointed out, or an osdev.org forum search would have found you the answers you require.

We have a large signal:noise ratio here and are actively attempting to prune out stupid and irrelevant posts so that we can focus more on the intelligent posts. Rehashing the same advice again and again is not what we take time out of our day to do.

Long story short: your petulant response means that I'll now be looking at every post you write to judge its effectiveness: Thanks a lot, you've just made me take more time out of my day.

Re: FASM vs. NASM: What's the Difference?

Posted: Sun Sep 06, 2009 8:55 am
by Dex
I think ClarionCoder51 question was a valied one, as just read a spec of both Assemblers will not answer the question.
Its like which car is best, people who have used both for OS Dev, can say why they when for that assembler.

And remember, no one can learn without copying.

Re: FASM vs. NASM: What's the Difference?

Posted: Sun Sep 06, 2009 11:26 am
by Combuster
Dex wrote:And remember, no one can learn without copying.
Proof wanted.

Re: FASM vs. NASM: What's the Difference?

Posted: Sun Sep 06, 2009 11:44 am
by Troy Martin
Combuster wrote:
Dex wrote:And remember, no one can learn without copying.
Proof wanted.
*waves*

I generally disagree with Dex, but I learned most of my x86 assembly from copying. Sure, it was pretty stupid at the time, but I now know how to read/write/speak/breathe the language.

I did not, however, learn C from copying. My C came years before I learned ASM.
ClarionCoder51 wrote:Wow. I didn't know somebody could have such an attitude.
Meet Combuster (no offense.) And I wouldn't call it a bad attitude, just a hard-@$$ way of putting things straight (again, no offense.)
ClarionCoder51 wrote:I've been hearing alot about NASM, lately. There's NASM this and NASM that and "Hey, I use NASM, too!". I ended up using FASM by chance, but I never really compared the two before. What's the difference?
Mainly just syntax and the fact FASM has an ARM version. FASM is also easier to port for those who write their OS in assembly language. I prefer NASM because most of the OSDev tutorials, the wiki, and lots of people use it. And I also find it a lot easier to use, don't ask me why.

Re: FASM vs. NASM: What's the Difference?

Posted: Sun Sep 06, 2009 12:54 pm
by ClarionCoder51
Dex, I applaud you. For me, I am a semi-newbie. I can understand the logic and order off code when implementing somethhing, but I need a snippet of code in order to grasp the big idea on the code side. If you give me which register to put incoming bytes in, I'll figure the rest out. And here's another thing: why all of a sudden people complaining about the fact that I don't google stuff? How on God's earth could I have figured out the answer to this post with google? YES. I GOOGLED IT. The answer isn't in the Wiki either. YES. I LOOKED IN THE WIKI. If people keep screaming in my ear to look in the Wiki for every question that I ask that isn't even there, then why would there even be a forum in the first place?

Oops!! Excuse my caps lock...