FASM vs. NASM: What's the Difference?
- ClarionCoder51
- Member
- Posts: 28
- Joined: Sun Aug 16, 2009 11:52 am
- Location: Georgia, USA
FASM vs. NASM: What's the Difference?
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?
"The n00b zone is for loading and unloading newbies only."
Re: FASM vs. NASM: What's the Difference?
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.
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.
"Open source seems to embrace the dark side of human nature." - Ville Turjanmaa
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: FASM vs. NASM: What's the Difference?
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".
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?
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.
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
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?
Or try JWasm. It's written also in C and it's 100% compatible with MASM syntax.Dex wrote: if you are a C programmer that will be moving your OS to C as soon as you can, go for nasm.
Only MASM bugs aren't supported !
"Open source seems to embrace the dark side of human nature." - Ville Turjanmaa
Re: FASM vs. NASM: What's the Difference?
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.
Valix is an experiment in an interpreted userspace with object-oriented and functional design patterns. Developers needed! Join #valix on irc.freenode.net
Re: FASM vs. NASM: What's the Difference?
Nasm is the most used with C, but IMHO it is not the best assembler.xvedejas wrote:I don't see anyreason why Nasm is better for working with C
"Open source seems to embrace the dark side of human nature." - Ville Turjanmaa
- ClarionCoder51
- Member
- Posts: 28
- Joined: Sun Aug 16, 2009 11:52 am
- Location: Georgia, USA
Re: FASM vs. NASM: What's the Difference?
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.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".
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.
"The n00b zone is for loading and unloading newbies only."
Re: FASM vs. NASM: What's the Difference?
Then you've not looked correctly, and you've made one of the following mistakes: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.
- 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.
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.
When the chance of succeeding is 99%, there is still a 50% chance of that success happening.
-
- Member
- Posts: 2566
- Joined: Sun Jan 14, 2007 9:15 pm
- Libera.chat IRC: miselin
- Location: Sydney, Australia (I come from a land down under!)
- Contact:
Re: FASM vs. NASM: What's the Difference?
See that section at the bottom of that article there, the "Reference Links"? Try clicking on them, perhaps?I read the entire article on the soundblaster 16 and nowhere in that article did I find info on how to implement soundblaster 16.
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.but the wiki is filled with so much stuff that has nothing of actual use to me
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?
Hi,
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.
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.ClarionCoder51 wrote: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.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".
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.
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?
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.
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.
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: FASM vs. NASM: What's the Difference?
Proof wanted.Dex wrote:And remember, no one can learn without copying.
- Troy Martin
- Member
- Posts: 1686
- Joined: Fri Apr 18, 2008 4:40 pm
- Location: Langley, Vancouver, BC, Canada
- Contact:
Re: FASM vs. NASM: What's the Difference?
*waves*Combuster wrote:Proof wanted.Dex wrote:And remember, no one can learn without copying.
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.
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:Wow. I didn't know somebody could have such an attitude.
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.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?
- ClarionCoder51
- Member
- Posts: 28
- Joined: Sun Aug 16, 2009 11:52 am
- Location: Georgia, USA
Re: FASM vs. NASM: What's the Difference?
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...
Oops!! Excuse my caps lock...
"The n00b zone is for loading and unloading newbies only."