OSDev.org

The Place to Start for Operating System Developers
It is currently Wed Apr 23, 2014 9:09 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 32 posts ]  Go to page Previous  1, 2, 3  Next
Author Message
 Post subject: Re:NASM vs. FASM
PostPosted: Wed Apr 13, 2005 9:06 am 
Offline
Member
Member
User avatar

Joined: Wed Oct 18, 2006 2:31 am
Posts: 5959
Location: In a galaxy, far, far away
Jubbens wrote:
I think I opened Pandora's Box with this thread.


Hehe .. asking ppl what assembler they prefer is almost as dangerous as asking what editor is the best (please don't answer).

That being said, i'm always surprised of how much importance asm people give to the fact their asm-devkit is self-sufficient ... What linker would you use with your FASM-produced binaries ? What library archive maintainer ? What debugger ? ...

I guess you got my point. Even if running an assembler in your OS is fine, you're still far away from _developing_ under your own OS , imvho.

And yes, i must admit i'm a bit disappointed NASM is no longer the #1 reference as it was 5 years back (where it seemed to be the solution to MASM vs TASM conflict).

_________________
May the source be with you.


Top
 Profile  
 
 Post subject: Re:NASM vs. FASM
PostPosted: Wed Apr 13, 2005 9:17 am 
Offline
Member
Member

Joined: Thu Nov 16, 2006 12:01 pm
Posts: 6874
Location: Germany
Welcome to the world of constant change. That feeling is the first sign that you're growing old. ;)

_________________
Every good solution is obvious once you've found it.


Top
 Profile  
 
 Post subject: Re:NASM vs. FASM
PostPosted: Wed Apr 13, 2005 9:22 am 
Solar wrote:
Welcome to the world of constant change. That feeling is the first sign that you're growing old. ;)


The realist in the group speaks up!

BTW, Pype.Clicker, EDLIN is still my favorite...but then there are those who still use vi too. Which to Solar's point, means I one old mutha! ;D


Top
  
 
 Post subject: Re:NASM vs. FASM
PostPosted: Wed Apr 13, 2005 9:28 am 
Offline
Member
Member
User avatar

Joined: Sat Jan 15, 2005 12:00 am
Posts: 5683
Location: At his keyboard!
Hi,

Pype.Clicker wrote:
What linker would you use with your FASM-produced binaries ? What library archive maintainer ? What debugger ? ...


You'd get NASM/FASM to generate pure binaries, rather than object files, and use %include "library_stuff.asm" instead of libraries.

This is what I do anyway - normally make is the only other tool I use (but I have used batch files under DOS instead). I only use linkers and libraries when I use compilers...

As for debugging, I use Bochs, ndisasm and a little home-made utility that searches for my debugging markers within my binaries. In conjunction with my OS's critical error reports I've never really needed anything else. It's not too good when trying to debug C code though..


Cheers,

Brendan

_________________
The BCOS Project:
http://bcos.hopto.org

Slow code that scales better can be faster than fast code that doesn't scale!


Top
 Profile  
 
 Post subject: Re:NASM vs. FASM
PostPosted: Wed Apr 13, 2005 12:18 pm 
FASM?s macro abilities are better than the ones of NASM! I also belief that FASM generates smaller code than NASM. I used NASM for a long time, but when I wanted easier my code I switch to FASM, because of its macro abilities.

And if you want to develop for 64bit, FASM is the only way to go, because NASM doesn?t support it and YASM is not that useable - at the time I tested it - !


Top
  
 
 Post subject: Re:NASM vs. FASM
PostPosted: Wed Apr 13, 2005 7:40 pm 
Quote:
I also belief that FASM generates smaller code than NASM


Ever tried to execute a "nop" with something smaller than 0x90 ?


Top
  
 
 Post subject: Re:NASM vs. FASM
PostPosted: Thu Apr 14, 2005 1:59 am 
Offline
Member
Member
User avatar

Joined: Wed Oct 18, 2006 2:31 am
Posts: 5959
Location: In a galaxy, far, far away
FlashBurn wrote:
FASM?s macro abilities are better than the ones of NASM!

Still waiting for that to be demonstrated. if you have a pointer to a page that shows some (useful) macro FASM can do and which is impossible for NASM, or some page that shows how easier it is to program macros for FASM compared to NASM macros, you're welcome.

Quote:
I also belief that FASM generates smaller code than NASM.

NASM was known to be a do exactly what you're told assembler. So if you want to use a 1-byte constant or a short displacement, you should tell it to the assembler. Otherwise, the assembler just picks what the default stuff means.

So,
Code:
mov eax,1   ;; this one will take 5 bytes iirc
mov eax,byte 1;; this one takes only 2 bytes


That may be awkward or save your life depending on the situation, but i admit it is awkward more often than it saves your life.

Quote:
And if you want to develop for 64bit, FASM is the only way to go, because NASM doesn?t support it and YASM is not that useable - at the time I tested it - !

Now *this* is a real argument.

_________________
May the source be with you.


Top
 Profile  
 
 Post subject: Re:NASM vs. FASM
PostPosted: Thu Apr 14, 2005 3:33 am 
Quote:
as for editors: i use ********

Cool, I tought that I was about the only one that used ********.


Top
  
 
 Post subject: Re:NASM vs. FASM
PostPosted: Thu Apr 14, 2005 4:17 pm 
gas :)

I used to favor nasm, but gas is "just there", and is reasonable similar on other archs, so all you have to learn is the arch specific stuff, not the assembler syntax... at&t style also makes me smile :)

-Erik


Top
  
 
 Post subject: Re:NASM vs. FASM
PostPosted: Thu Apr 14, 2005 11:53 pm 
Offline
Member
Member

Joined: Thu Nov 16, 2006 12:01 pm
Posts: 6874
Location: Germany
Pype started to asterix any editor names, as to keep this on-topic. ("Favourite Editor" is such a piece of OT-bait...)

I followed up. Just in case you're wondering. Keep this on the topic of assemblers. ;)

_________________
Every good solution is obvious once you've found it.


Top
 Profile  
 
 Post subject: Re:NASM vs. FASM
PostPosted: Fri Apr 15, 2005 4:12 am 
Offline
Member
Member
User avatar

Joined: Sat Oct 23, 2004 11:00 pm
Posts: 1206
Location: Sweden
Pype.Clicker wrote:
Still waiting for that to be demonstrated. if you have a pointer to a page that shows some (useful) macro FASM can do and which is impossible for NASM, or some page that shows how easier it is to program macros for FASM compared to NASM macros, you're welcome.


Don't excatly know what NASM can do, but this may give you a hint of fasm's marco syntax:

http://www.decard.net/?body=tajga&chapter=preproc
http://flatassembler.net/docs.php?article=manual#2.3.3
http://board.flatassembler.net/forum.php?f=14 - Look in some threads..

_________________
"Simplicity is the ultimate sophistication." - Leonardo da Vinci
http://bos.asmhackers.net/


Top
 Profile  
 
 Post subject: Re:NASM vs. FASM
PostPosted: Fri Apr 15, 2005 4:31 am 
Offline
Member
Member
User avatar

Joined: Wed Oct 18, 2006 2:31 am
Posts: 5959
Location: In a galaxy, far, far away
same for nasm: http://nasm.sourceforge.net/doc/html/na ... tion-4.3.2

- macro-local labels: just use %%label
- labels concatenation: there used to be things like [tt]__Symbol_%1_%2[/tt], but it appears latest versions also have [tt]whatever %+ anything[/tt]

The only thing i cannot find in nasm is the "%var in <eax,edx,ecx,ebx>" thing. Dunno how often one uses this, though.

_________________
May the source be with you.


Top
 Profile  
 
 Post subject: Re:NASM vs. FASM
PostPosted: Sat Apr 16, 2005 3:08 pm 
Solar wrote:
Just my 0.02?. (And since I am using GNU 'as' / AT&T syntax, you can probably discount me as nutcase anyway. :-D )


oh dear, i'm moving from nasm to gas myself, I wondered what the nervouse twitch was, at least there is relative harmony between architechtures with gas. You learn it once and appart from small details, it's the same.

srg


Top
  
 
 Post subject: Re:NASM vs. FASM
PostPosted: Sun Apr 17, 2005 2:08 am 
WOW
Ten years ago assembler programming was considered a thing of the past, used by old "dinosaurus" programmers.

It seems that recent years had changed this way of thinking and one of the strongest evidence are the new flavors of assemblers and this "what's the best assembler" argument going in here.

As for myself (as you might understand from my signiture) An assembler is a luxury I'm still very far from achieving. But I do enjoy the listing feature of FASM when I try to improve my opcode coding skills :-) I think that an option to specify the include library as a command line parameter (currently you need to set up an environment variable for it) would be nice. But other then that I had no major difficulties using it.


Top
  
 
 Post subject: Re:NASM vs. FASM
PostPosted: Sun Apr 17, 2005 3:23 am 
Red Shaya wrote:
It seems that recent years had changed this way of thinking and one of the strongest evidence are the new flavors of assemblers and this "what's the best assembler" argument going in here.
Something to point out, here in the OS Dev world, it is impossible to work without an assembler so this isn't a reflection of the industry at large. Microsoft is pushing developers onto their .Net emulator which doesn't support assembly (unless you count IL).

To move on topic, I use NASM/YASM for external assembly files (ISR stubs and the entry point) but I am reasonably comfortable with GAS for inlining although I am reluctant to use it for everything (I don't feel like having to learn its directives for declaring sections and buffers and such when I already know how in NASM although I probably will eventually).


Top
  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 32 posts ]  Go to page Previous  1, 2, 3  Next

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot], Yahoo [Bot] and 11 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group