News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

NASM, FASM, or SolASM?

Started by SunSpyda, April 12, 2009, 02:05:02 PM

Previous topic - Next topic

SunSpyda

I am migrating from AT&T to Intel assembly, so I am in the market for a new assembler to replace Gas. Sorry if there have already been a zillion questions on the matter, but I was wondering which assembler would be suitable.

I want a assembler that produces very fast code (Mind you, pretty much all assemblers do this), and I am not bothered about having HLL features like 'if else'.

Whilst MASM looks great, it isn't an option, because it only functions on Windows. I know this is a MASM forum, but seeing as I am still coding in the Intel syntax, I don't see a problem....  :bg

I have had 3 recommendations from people around here..

Netwide Assember - NASM
Flat Assembler - FASM
Solar Assembler - SolASM

I heard Flat is very fast and contains no HLL stuff, which would be ideal. NASM is widely used, so it's quite compatable. I have also heard positive things about SolASM.

So which one do you all think would be good for me to start Intel Assembly on? Thanks in advance =)

mitchi

Well try them. It's really a MASM forum here so people so I don't think you will get many comments about this.
I will just say this : If I had to write a linux program in assembly, I wouldn't mind using any of these 3 to get the job done. So the rest is up to your personal preference now.

Mark Jones

With that, I would also suggest sticking with which ever one you choose. Trying to learn all three would be daunting indeed.

Also, for your purposes, check out Agner's Objconv utility: http://www.agner.org/optimize/#objconv
"To deny our impulses... foolish; to revel in them, chaos." MCJ 2003.08

brethren


hutch--

I would second using the GNU assembler in Intel mode, its a good tool, a bit raw here and there but it works well and powerful enough once you are used to it.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

SunSpyda

Quote from: brethren on April 12, 2009, 08:12:07 PM
Why change your assembler, gas supports intel syntax
http://en.wikipedia.org/wiki/GNU_Assembler

Yeah, I was thinking about this, but last time I checked, the intel_syntax option didn't really work very well. For example it still required AT&T register prefixes (This has now been fixed apparently), and it still used # for comments rather than ;. But then again, it was about half a year ago I last checked, and a lot of these problems have probably been sorted out by now.

So, I will take a look at this, seeing as Gas is pretty ideal for me, bar the AT&T syntax.

Thanks for the help, and yes I will only stick to 1 assembler, using more than 1 just seems like too much work.

Vortex

Hi SunSpyda,

If you are interest in using Gas in Intel syntax mode, here are some links for you:

http://www.masm32.com/board/index.php?topic=3464.0

http://www.masm32.com/board/index.php?topic=3490.0

http://www.masm32.com/board/index.php?topic=4831.0

SolAsm is a very fast assembler capable of creating EXE, OMF,COFF and ELF OBJ. The syntax is similar to that of Tasm, Borland's Turbo Assembler.

BogdanOntanu

Quote from: Vortex on April 13, 2009, 05:13:24 PM
SolAsm is a very fast assembler capable of creating EXE, OMF,COFF and ELF OBJ. The syntax is similar to that of Tasm, Borland's Turbo Assembler.

Thanks for the advertisement ;)

One extra thing: Sol_ASM can also create a flat binary designed to run at an absolute address (for OS development).
In fact Solar_Os is now written in Sol_Asm.
Ambition is a lame excuse for the ones not brave enough to be lazy.
http://www.oby.ro

Vortex


ramguru

Quote from: Vortex on July 11, 2009, 08:18:38 AM
New SolAsm version 0.28.14 available from :

http://oby.ro/sol_asm/sol_asm_download_bin.htm


Tried to compile win64 example
..it won't run, something's bad with PE32+ header (too many zeros  :lol )

BogdanOntanu

Quote from: ramguru on July 13, 2009, 09:33:30 PM

Tried to compile win64 example
..it won't run, something's bad with PE32+ header (too many zeros  :lol )

Thanks for your report ramguru. I will check it out.

Regards,
Bogdan
Ambition is a lame excuse for the ones not brave enough to be lazy.
http://www.oby.ro

MichaelW

SunSpyda,

Recent versions of GAS allow C-style comments anywhere, for example:

/* this is a  comment */

Or for single line comments:

// this is a comment

But this will not work for a trailing comment on a line.

I posted a console and a GUI app along with some support code here:

http://www.masm32.com/board/index.php?topic=8689.0

eschew obfuscation

Logman

I just switched back to using MASM32, but used to use NASM, then picked up on FASM because of its simplicity and speed.

FASM also comes with a basic IDE, which installs fairly easy. Once you unzip the FASM files, the program is ready to work. You can move it to any drive or directory you want, even use it from a thumb drive (USB).

NASM has to muck around in your registry and that can be problematic, especially if you work for the government or in an office where you don't have administrative rights on your system. I liked NASM, but I switched at a time it seemed to go unsupported. Updates are far an few between. So, on the one hand it remains stable for long periods, but doesn't get updated as often.

One other choice is to use GoAsm. GoAsm has a really nice IDE and installs as easily as FASM. Both FASM and GoAsm have a lot going for them. Of the three, I think GoAsm has the best documentation and is the easiest to pickup on. FASM doesn't use a lot of the MASM conventions and like NASM, doesn't do any type-checking. FASM also only works in flat32 mode--no DOS or 64-bit mode (yet).

In my opinion, GoAsm has a better overall forum and much better support. The program gets updated often and produces both Win32 and Win64 code.

I trided HLA for awhile and in its own way, works terrific--I liked it, but it was like programming in Pascal, C, and assembler all at once and I didn't want to learn that aspect of it. It is exceedingly well supported; lot's of documentation and frequent updates.

Anyway, having programmed all my life in MASM 1.0 - 5.0, I came back. I'm just used to its syntax and macros. For me, it's an all-around winner because you can use as much of its complexity as you want or none at all--just use the barebones code.

Logman
If you read the fine print, you'll get an education. If you don't, you'll get experience!

farrier

Logman,

I'm wondering what fasm you were using.  The proper one is at flatassembler.net. 

"FASM doesn't use a lot of the MASM conventions"

There is very little that Masm can do that fasm can't, with the help of usability macros, most Masm features are available.

"FASM also only works in flat32 mode--no DOS or 64-bit mode (yet)."

Everything here is incorrect.  Dos, linux, DexOs, BSD, 16-32-64 bit.  As well as support for ARM chipped machines.  New things added all the time.  And for all but the most complex apps, no linker is required.  The fasm will assemble and construct the executable/DLL in one step.  You just tell it what you are constructing.

Just to let you know you may have missed a lot of the capabilities of the fasm.  Enjoy Masm32!

farrier

It is a GOOD day to code!
Some assembly required!
ASM me!
With every mistake, we must surely be learning. (George...Bush)

Vortex

Quote from: farrier on July 17, 2009, 05:12:51 PM
And for all but the most complex apps, no linker is required.

Fasm supports direct PE output and it can create MS COFF object modules.