Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Which assembler to choose?

439 views
Skip to first unread message

Stefanos

unread,
Oct 16, 2004, 2:23:52 PM10/16/04
to
Hello folks.
I am an assembly entusiast and have already some 8086 programming
experience, using MASM. I have recently discoverd HLA and the tools
accompanying it, such as MASM32, RADAsm, etc, and they seem really
promising , especially when it comes to Windows programming. In your
opinion which is the most powerful and most useful environment for
programming with assembly? Do you have any suggestions?
Thanks for your time.

Stefanos

Percival

unread,
Oct 16, 2004, 3:26:44 PM10/16/04
to

See my post in Alt.lang.asm. I'll just copy and paste the majority of it
here:

Exact copy and paste from my post in A.L.asm

////////////////////
HLA -- Good high level "training" language. It is a good way to learn
assembly step by step, rather than diving in directly into assembly. It
comes with a library (as you know) and is easily used. One of the 4
cross-platform assemblers. RadASM works with this. The only books on
this that i know of are written by Randall Hyde. He hangs around here,
so he can tell you more about this.

Masm32 -- This assembler offers a lower-level view of assembly than HLA.
It doesn't provide as much for you as HLA does, but it still gives you
the win32 api headers preinstalled and ready to go. This is not
cross-platform at all, and will only work on a windows machine. RadASM
works with this. Hutch owns this freeware assembler, and he hangs around
here too. Masm has the most books on assembler, but the vast majority
are obsolete, and is easily translated to Nasm or Fasm.

RosAsm -- A still, lower level assembler. Betov probably already told
you about this, I see it as a cool tool to write assembly with. It comes
with a strange syntax, and is not cross platform at all (windows only)
It does come with lots of interactive stuff that looks cool, i haven't
worked with this much myself. Some people here claim it crashes often,
I'll leave it up to you to read up on this newsgroup's flamewars about
this assembler. Betov is the author of this. RosAsm is written in
RosAsm, so if you need to see sample code, look at RosAsm's source.

Nasm -- A cross platform assembler that is popular among linux users.
This is very similar to Fasm, except that it is a bit slower. Doesn't
matter though, all assemblers (except HLA) are extreemly fast, and HLA
is still faster than most C compilers i worked with. It comes with a
C-like macro language, and comes with loads of documentation. There are
more up-to-date books on Nasm, and Nasm works on all platforms,
including Mac OSX. Why you want to run x86 assembly on a powerPC, i
don't know, but you could if you wanted to.

Fasm -- Another cross platform assembler that looks alot like nasm, ALOT
like nasm. This assembler focuses more on Windows than other platforms,
but this still runs on many x86 platforms, including MenuetOS, Linux,
BeOS, and Windows. (much less than Nasm and Gas however) The macro
language of Fasm is different, and in some ways is better than Nasm, and
in others worse. If you like Nasm, give Fasm a shot, you may like it
better. One of the fastest assemblers, compiles loads in less than a
second. It is written in Fasm assembly, so if you need to see a sample
source code, then just look at Fasm.

Gas -- The most cross-platform assembler there is. It is gnu's official
assembler, and but it has a VERY strange syntax. I haven't used it much,
but it appears to use the C preprocessor, so #define and #include work
the exact same as in C or C++. GCC also produces gas code, so if you
ever wanted to see your C code in Gas, just type in gcc -S myfile.c and
you will see the assembly output.

A86 -- The first not-free assembler i have mentioned. There is a
freeware version, but it doesn't support any of the 32-bit instructions
that started in the early 90s. (eax doesn't work) I haven't bought it,
or used the full version, but from the free version, I say it sucks.
However, it looks alot like Fasm and Nasm, aside from the macros.

///////////////////

Percival

Scott Moore

unread,
Oct 16, 2004, 6:45:59 PM10/16/04
to
Percival wrote:

> Stefanos wrote:
>
>> Hello folks.
>> I am an assembly entusiast and have already some 8086 programming
>> experience, using MASM. I have recently discoverd HLA and the tools
>> accompanying it, such as MASM32, RADAsm, etc, and they seem really
>> promising , especially when it comes to Windows programming. In your
>> opinion which is the most powerful and most useful environment for
>> programming with assembly? Do you have any suggestions?
>> Thanks for your time.
>>
>> Stefanos
>>
>
> See my post in Alt.lang.asm. I'll just copy and paste the majority of it
> here:
>
> Exact copy and paste from my post in A.L.asm
>
> ////////////////////
> HLA -- Good high level "training" language. It is a good way to learn
> assembly step by step, rather than diving in directly into assembly. It
> comes with a library (as you know) and is easily used. One of the 4
> cross-platform assemblers. RadASM works with this. The only books on
> this that i know of are written by Randall Hyde. He hangs around here,
> so he can tell you more about this.

Mainly useful if you want to construct code that does not directly use
a lot of x86 assembler code. If (for example) you like to make a lot
of macros that hide low level code, this is for you.

>
> Masm32 -- This assembler offers a lower-level view of assembly than HLA.
> It doesn't provide as much for you as HLA does, but it still gives you
> the win32 api headers preinstalled and ready to go. This is not
> cross-platform at all, and will only work on a windows machine. RadASM
> works with this. Hutch owns this freeware assembler, and he hangs around
> here too. Masm has the most books on assembler, but the vast majority
> are obsolete, and is easily translated to Nasm or Fasm.

Traditional, but type oriented. That is, a label reference can be treated
differently depending on its "type", such as byte, word, etc. Most
assemblers are not type oriented. Modifiers look like MASM modifiers, ie.,
"byte", "word" etc.

>
> RosAsm -- A still, lower level assembler. Betov probably already told
> you about this, I see it as a cool tool to write assembly with. It comes
> with a strange syntax, and is not cross platform at all (windows only)
> It does come with lots of interactive stuff that looks cool, i haven't
> worked with this much myself. Some people here claim it crashes often,
> I'll leave it up to you to read up on this newsgroup's flamewars about
> this assembler. Betov is the author of this. RosAsm is written in
> RosAsm, so if you need to see sample code, look at RosAsm's source.
>
> Nasm -- A cross platform assembler that is popular among linux users.
> This is very similar to Fasm, except that it is a bit slower. Doesn't
> matter though, all assemblers (except HLA) are extreemly fast, and HLA
> is still faster than most C compilers i worked with. It comes with a
> C-like macro language, and comes with loads of documentation. There are
> more up-to-date books on Nasm, and Nasm works on all platforms,
> including Mac OSX. Why you want to run x86 assembly on a powerPC, i
> don't know, but you could if you wanted to.

Like masm syntax, but not type oriented. Also, very good at integrating
different modes of code, such as 16 bit, 32 bit, and 16 bit protected.
This is the assembler of choice for creating bootstraps, which need a
lot of mode switches inline.

>
> Fasm -- Another cross platform assembler that looks alot like nasm, ALOT
> like nasm. This assembler focuses more on Windows than other platforms,
> but this still runs on many x86 platforms, including MenuetOS, Linux,
> BeOS, and Windows. (much less than Nasm and Gas however) The macro
> language of Fasm is different, and in some ways is better than Nasm, and
> in others worse. If you like Nasm, give Fasm a shot, you may like it
> better. One of the fastest assemblers, compiles loads in less than a
> second. It is written in Fasm assembly, so if you need to see a sample
> source code, then just look at Fasm.
>
> Gas -- The most cross-platform assembler there is. It is gnu's official
> assembler, and but it has a VERY strange syntax. I haven't used it much,
> but it appears to use the C preprocessor, so #define and #include work
> the exact same as in C or C++. GCC also produces gas code, so if you
> ever wanted to see your C code in Gas, just type in gcc -S myfile.c and
> you will see the assembly output.

Ok, but uses AT&T syntax, not x86, which means it does not work anything
like the Intel book examples. Also, notoriously poor at 16 bit code and
16/32 bit integration. Despite typical GNU group arguments about using
the C preprocessor with GAS, the macro facillities are poor or
nonexistant, depending on your feeling about the validity of strapping
a macro pass on a non-macro assembler.

GAS is typeless, and uses modifiers to assert the type of an operand,
such as adds for "add short". Modifiers are designed to look like C.

>
> A86 -- The first not-free assembler i have mentioned. There is a
> freeware version, but it doesn't support any of the 32-bit instructions
> that started in the early 90s. (eax doesn't work) I haven't bought it,
> or used the full version, but from the free version, I say it sucks.
> However, it looks alot like Fasm and Nasm, aside from the macros.
>
> ///////////////////
>
> Percival
>

Also, TASM, which is Borlands version of MASM, and

IP assembler -- Not freeware, a typeless macro assembler that uses modifiers
after the instruction like "addw", "addd", "addb", etc, but otherwise tries
to look like Intel syntax. IP as is cross platform (multi-CPU, multi-OS,
can cross assemble from one platform to another target). IP is not pinned
to a particular CPU, except that all efforts are made to make the syntax
look like the original CPU manufacturer's examples. However, the assembler
directives are universal, and the same across all CPU targets (much
like GAS). IP uses "zero pass" assembly, meaning that all unresolved
expressions can be forwarded to its link format, so it has no multipass
characteristics or problems. Has "precompiled macros", meaning that it
processes the macros to an internal form instead of executing the macro
code over again for each expansion (a fairly common feature).


--
Samiam is Scott A. Moore

Personal web site: http:/www.moorecad.com/scott
My electronics engineering consulting site: http://www.moorecad.com
ISO 7185 Standard Pascal web site: http://www.moorecad.com/standardpascal
Classic Basic Games web site: http://www.moorecad.com/classicbasic
The IP Pascal web site, a high performance, highly portable ISO 7185 Pascal
compiler system: http://www.moorecad.com/ippas

Good does not always win. But good is more patient.

David Lindauer

unread,
Oct 16, 2004, 7:05:00 PM10/16/04
to
it depends on what platform you are programming for. In general NASM is
good, but if you are programming explicitly for WIN32 you might want
something that includes headers such as MASM32.
I don't know much about the legality of MASM32 though... it seems to
leverage a *lot* of microsoft code which is after all freely
available... but even though microsoft makes certain things freely
available that does *not* mean they are freely redistributable. Their
licensing generally explicitly prohibits this...

David

Phil Carmody

unread,
Oct 16, 2004, 7:24:32 PM10/16/04
to
Scott Moore <spam...@crayne.org> writes:
> > Gas -- The most cross-platform assembler there is. It is gnu's
> > official assembler, and but it has a VERY strange syntax. I haven't
> > used it much, but it appears to use the C preprocessor, so #define
> > and #include work the exact same as in C or C++. GCC also produces
> > gas code, so if you ever wanted to see your C code in Gas, just type
> > in gcc -S myfile.c and you will see the assembly output.
>
> Ok, but uses AT&T syntax, not x86,

Unless you use the directive
.intel_syntax
which makes it closer to intel's standard notation.

Phil
--
They no longer do my traditional winks tournament lunch - liver and bacon.
It's just what you need during a winks tournament lunchtime to replace lost
... liver. -- Anthony Horton, 2004/08/27 at the Cambridge 'Long Vac.'

Percival

unread,
Oct 16, 2004, 7:25:12 PM10/16/04
to
Scott Moore wrote:

> Percival wrote:
>
>> ////////////////////
>> HLA -- Good high level "training" language. It is a good way to learn
>> assembly step by step, rather than diving in directly into assembly.
>> It comes with a library (as you know) and is easily used. One of the 4
>> cross-platform assemblers. RadASM works with this. The only books on
>> this that i know of are written by Randall Hyde. He hangs around here,
>> so he can tell you more about this.
>
>
> Mainly useful if you want to construct code that does not directly use
> a lot of x86 assembler code. If (for example) you like to make a lot
> of macros that hide low level code, this is for you.
>
>>
>> Masm32 -- This assembler offers a lower-level view of assembly than
>> HLA. It doesn't provide as much for you as HLA does, but it still
>> gives you the win32 api headers preinstalled and ready to go. This is
>> not cross-platform at all, and will only work on a windows machine.
>> RadASM works with this. Hutch owns this freeware assembler, and he
>> hangs around here too. Masm has the most books on assembler, but the
>> vast majority are obsolete, and is easily translated to Nasm or Fasm.
>
>
> Traditional, but type oriented. That is, a label reference can be treated
> differently depending on its "type", such as byte, word, etc. Most
> assemblers are not type oriented. Modifiers look like MASM modifiers, ie.,
> "byte", "word" etc.

Also forgot to add that this is Microsoft's official assembler.

>> Nasm -- A cross platform assembler that is popular among linux users.
>> This is very similar to Fasm, except that it is a bit slower. Doesn't
>> matter though, all assemblers (except HLA) are extreemly fast, and HLA
>> is still faster than most C compilers i worked with. It comes with a
>> C-like macro language, and comes with loads of documentation. There
>> are more up-to-date books on Nasm, and Nasm works on all platforms,
>> including Mac OSX. Why you want to run x86 assembly on a powerPC, i
>> don't know, but you could if you wanted to.
>
>
> Like masm syntax, but not type oriented. Also, very good at integrating
> different modes of code, such as 16 bit, 32 bit, and 16 bit protected.
> This is the assembler of choice for creating bootstraps, which need a
> lot of mode switches inline.

Not type oriented meaning that Nasm won't remember that you defined a
certain place to be unsigned, or doubleword. I forgot to mention that
Nasm and Fasm are the only two assemblers (i know of) that support flat
binary output. Very useful for bootstraps.

One of the few differences between Nasm and Fasm, is that Fasm will
remember that you declared something a doubleword. (it won't be as good
as HLA, where it remembers even signed and unsigned numbers, but I
prefer it this way. A good balance between typeless and type oriented)

>> Gas -- The most cross-platform assembler there is. It is gnu's
>> official assembler, and but it has a VERY strange syntax. I haven't
>> used it much, but it appears to use the C preprocessor, so #define and
>> #include work the exact same as in C or C++. GCC also produces gas
>> code, so if you ever wanted to see your C code in Gas, just type in
>> gcc -S myfile.c and you will see the assembly output.
>
>
> Ok, but uses AT&T syntax, not x86, which means it does not work anything
> like the Intel book examples. Also, notoriously poor at 16 bit code and
> 16/32 bit integration. Despite typical GNU group arguments about using
> the C preprocessor with GAS, the macro facillities are poor or
> nonexistant, depending on your feeling about the validity of strapping
> a macro pass on a non-macro assembler.
>
> GAS is typeless, and uses modifiers to assert the type of an operand,
> such as adds for "add short". Modifiers are designed to look like C.

I'll like to add...
If you have only seen CPP at preprocessing...
The macro languages in the other assemblers will blow you away. I have
seen entire programs written in Fasm and Nasm preprocessor, that
generate fractals in the form of bmp files, and even generates sound
.wav files. I don't reccomend you to do such a thing, but that is just
to show you how powerful these macros are.

> Also, TASM, which is Borlands version of MASM, and
>
> IP assembler -- Not freeware, a typeless macro assembler that uses
> modifiers
> after the instruction like "addw", "addd", "addb", etc, but otherwise tries
> to look like Intel syntax. IP as is cross platform (multi-CPU, multi-OS,
> can cross assemble from one platform to another target). IP is not pinned
> to a particular CPU, except that all efforts are made to make the syntax
> look like the original CPU manufacturer's examples. However, the assembler
> directives are universal, and the same across all CPU targets (much
> like GAS). IP uses "zero pass" assembly, meaning that all unresolved
> expressions can be forwarded to its link format, so it has no multipass
> characteristics or problems. Has "precompiled macros", meaning that it
> processes the macros to an internal form instead of executing the macro
> code over again for each expansion (a fairly common feature).

Well, to bring up the passes:
HLA -- i don't know
Masm -- Appears to be two pass
Nasm -- Two passes
Fasm -- as many passes required. Optimizes jumps the best of the assemblers
Gas -- i don't know

I see more passes as an advantage. Oh, and the Yasm project. It appears
to have just started, and looks to be buggy (I haven't used it, so i
don't know) It is adding extensions to the Nasm project to support AMD64
extensions.

Percival

Scott Moore

unread,
Oct 17, 2004, 2:23:08 AM10/17/04
to
Percival wrote:

> Scott Moore wrote:

> Not type oriented meaning that Nasm won't remember that you defined a
> certain place to be unsigned, or doubleword. I forgot to mention that
> Nasm and Fasm are the only two assemblers (i know of) that support flat
> binary output. Very useful for bootstraps.

IP as supports flat binary output directly (actually, it always outputs
a flat binary, and places the linker info in a separate file, essentially
a "markup" to the flat object).

Also, many assembler's outputcan be converted to flat, including MASM,
which is OBJ2EXE if I recall. There are even advanced utilities that convert
segmented code to flat, by essentially locating the segments, then
recalculating the net binary image. This is needed in embedded programming
a lot.

Scott Moore

unread,
Oct 17, 2004, 2:03:27 AM10/17/04
to
Scott Moore wrote:

>> Masm32 -- This assembler offers a lower-level view of assembly than
>> HLA. It doesn't provide as much for you as HLA does, but it still
>> gives you the win32 api headers preinstalled and ready to go. This is
>> not cross-platform at all, and will only work on a windows machine.
>> RadASM works with this. Hutch owns this freeware assembler, and he
>> hangs around here too. Masm has the most books on assembler, but the
>> vast majority are obsolete, and is easily translated to Nasm or Fasm.
>
>
> Traditional, but type oriented. That is, a label reference can be treated
> differently depending on its "type", such as byte, word, etc. Most
> assemblers are not type oriented. Modifiers look like MASM modifiers, ie.,
> "byte", "word" etc.

Sorry, that last sentence should have been attached to "NASM".

Betov

unread,
Oct 17, 2004, 1:53:43 PM10/17/04
to
Percival <spam...@crayne.org> écrivait news:2tda74F1ti6ugU3@uni-
berlin.de:

> RosAsm -- A still, lower level assembler. Betov probably already told
> you about this, I see it as a cool tool to write assembly with. It comes
> with a strange syntax, and is not cross platform at all (windows only)
> It does come with lots of interactive stuff that looks cool, i haven't
> worked with this much myself.

> Some people here claim it crashes often,

Whatever this sentence could mean to say, RosAsm has users
who do not miss to report, when they have a hang, and RosAsm
has a Developers team made of serious volunteers who do miss
to fix the bugs, as soon as they are comming out. Also, given
the number of Demos and Applications written with RosAsm, it
seems these "some people" never wrote anything, with RosAsm,
before "claiming" no base absurdities.


> I'll leave it up to you to read up on this newsgroup's flamewars about
> this assembler. Betov is the author of this. RosAsm is written in
> RosAsm, so if you need to see sample code, look at RosAsm's source.

___________________
Some missing infos:

RosAsm is the only one All-in-One Assembly PE producer,
(GPLed, Auto-Compilable) with full integration of:

- RAD/IDE
- Assembler
- Disassembler
- Source Level Debugger
- Resources Editors
- Sources Editor
- and many other Devs. Tools...

Some of the features:

* Click&Go Installation.
* Complete x86 32 Bits Instructions Set (up to SSE2).
* True Assembler.
* True Local Labels, plus Local Symbols.
* Simplified Intel Syntax (basicaly, simplified NASM-like Syntax).
* Integrations of the OS Equates, Structures, Api.
* No include, no Proto, no nothing.
* Multi-Lines Instructions and Multi-Instructions Lines.
* Errors pointed in the Source, both at [Compile] and at [Run] time.
* Accurate specific Errors Messages.
* Simplified Sources managements. Sources.
* All Components are saved inside the PEs.
* Blazing fast Compilations: 2 Mo Source > 5 Seconds/Celeron 1.3.
* TreeView of Source Code Labels.
* Bookmarks and instant BookMarks.
* Evoluated Structures Manager.
* Modules management by TITLE.
* Alternate and HLL-Like implementations through Pre-Parsers.
* Wizards Mechanism, with an example of 'Forms Wizard'.
* Progressive BackUps under user control.
* Instant Sources searches by Right-Click features.
* Code Completions.
* Powerfull and simple Macros System
* Macros unfolding.
* Evoluated Snippets manager ([Clip] feature)
* Reuse of Modules through the TITLEs feature.
* "IncInclude" Pre-Parser for shared Modules, with integrated management.
* Step by step Debugging.
* Debugger Memory Inspector.
* Virtual Break-Points, that can be set/removed at Write and/or Run-Time.
* Two-Clicks-Disassembler-Reassembler, actually effective on most Demos.
* Dialog Editor with Styles Help and Styles accuracy control,
* Dialogs for both Resources and Memory Templates.
* 2 Megas of Documentations: RosAsm Manual, 32 Bits Assembly Tutorials.
* Interactive Visual Tutorials.

< http://rosasm.org/ >


Betov.

hutch--

unread,
Oct 17, 2004, 7:37:50 PM10/17/04
to
David,

> I don't know much about the legality of MASM32 though... it seems to
> leverage a *lot* of microsoft code which is after all freely
> available... but even though microsoft makes certain things freely
> available that does *not* mean they are freely redistributable. Their
> licensing generally explicitly prohibits this...

The advice I have directly from Microsoft is that the enclosed EULA is
valid and that the use of the binary files owned by Microsoft is
conditional on compliance with the EULA. They have not seemed to be
interested in the issues raised by people who support alternative
licencing systems and have been fully informed for some years about
the extent of the distribution of the MASM32 project.

As this reply risks starting another holy war with the backyard GPL
lawyers, if you need to ask any questions about MASM, the EULA for it
or the MASM32 project, feel free to ask in the masmforum at
www.masmforum.com where you will find people who actually do
understand the EULA for MASM.

Regards,

hutch at movsd dot com

www.masm32.com

Percival

unread,
Oct 17, 2004, 8:21:38 PM10/17/04
to
hutch-- wrote:

> As this reply risks starting another holy war with the backyard GPL
> lawyers, if you need to ask any questions about MASM, the EULA for it
> or the MASM32 project, feel free to ask in the masmforum at
> www.masmforum.com where you will find people who actually do
> understand the EULA for MASM.

BTW (I won't start our little war again Hutch)

Do you have an exact copy of the EULA lying around by any chance? I
remember you said there was a Licence close to the looks of it. If you
cannot find the exact copy of that EULA on the net, could you give me
the link of the similar one and the differences? Thx.

Percival

hutch--

unread,
Oct 20, 2004, 8:55:51 AM10/20/04
to
Percival,

The Microsoft EULA for the Microsoft binaries in the MASM32 Project is
contained in the LICENCE directory in MASM32.

Penang

unread,
Oct 29, 2004, 1:14:37 AM10/29/04
to
Percival <spam...@crayne.org> wrote in message news:<2tdnvdF...@uni-berlin.de>...

> Well, to bring up the passes:
> HLA -- i don't know
> Masm -- Appears to be two pass
> Nasm -- Two passes
> Fasm -- as many passes required. Optimizes jumps the best of the assemblers
> Gas -- i don't know

> I see more passes as an advantage. Oh, and the Yasm project. It appears
> to have just started, and looks to be buggy (I haven't used it, so i
> don't know) It is adding extensions to the Nasm project to support AMD64
> extensions.

> Percival


I just found out of YASM, @
http://freshmeat.net/projects/yasm/?branch_id=36769&release_id=177113
and although I haven't use it for very long, I find its performance
above par.

Buggy ? Hmmmm... to be fair to all, YASM has bugs, but when I tried
FASM and NASM, they too have bugs.

One thing about YASM that NASM doesn't have is that YASM is under
active development, and you can actually write to the author and get a
response. NASM ... hmmm... when was the last time anyone from NASM
team even care to reply ?!

FASM's author is cool too, but right now, his intention is to make
FASM a full 64-bit product, and bugs are shoved into backburners for
the time being.

Of course, you don't have to take my word for it. You can try YASM
yourself.

PS. I don't have any connection to YASM - I'm just a user.

Frank Kotler

unread,
Oct 29, 2004, 8:06:06 AM10/29/04
to
Penang wrote:

> > Nasm -- Two passes

Actually, with the "-O" switch, Nasm will take as many passes as
necessary, up to the maximum you've specified...

> NASM ... hmmm... when was the last time anyone from NASM
> team even care to reply ?!

Looks like 10/12/2004...
<http://sourceforge.net/mailarchive/forum.php?forum=nasm-devel>

What is it you're unable to get a reply about?

Best,
Frank

Randall Hyde

unread,
Oct 30, 2004, 12:41:49 AM10/30/04
to
Stefanos <spam...@crayne.org> wrote in message news:<ckrkvi$fh6$2...@ulysses.noc.ntua.gr>...

http://webster.cs.ucr.edu/AsmTools/WhichAsm.html

Cheers,
Randy Hyde

0 new messages