Re: Which Assembler?



Having used none of the 'assemblers' listed below, but having been
programming in assembler for 35 years a couple of points can be made.

1. Higher level languages such as Cobol, Fortran, etc. are useful for
getting massive amounts of code done by people who don't have a clue
about bit twiddling, flags, etc. This works well for reports and
simpler tasks that don't require an understanding of the underlying
hardware and software.

2. All three assemblers are available via the WDK which is a free
package from Microsoft. You can have them all covering 16 & 32 bit
environments, 64 bit AMD and the 64 bit IA64.

3. All the above being true, if you want to be a bit twiddler you
have to know more than one assembly language. I started on the
Honeywell 201 (Easycoder) and the IBM ANFSQ7. I have done Z80
assembler under CP/M, Burroughs and Sperry mainframes, and the 8088
onward. Learning the various type of assembly languages gives you a
perspective on how the many CPUs vary. The Intel 8088 chips have a
move instruction that does not affect the flags, but other CPUs may
not and some do not. Sign extension, overflow, underflow, and stack
presence are some things I have seen that differ.



On Sun, 2 Dec 2007 12:37:48 -0800 (PST), Keith Kanios
<spamtrap@xxxxxxxxxx> wrote:

On Oct 7, 8:55 am, WillofIrony <spamt...@xxxxxxxxxx> wrote:

So, which is the best: GoASM, NASM, MASM32, RoASM? or did I miss the
best one? BTW, I did scan the FAQ but the latest version is almost
four years old and i suspect that the field of Win32 ASM is a rapidly
changing field at the moment.

Thanks in anticipation,

Michael

Most of the comments about NASM being slow/limited are very outdated.
NASM strikes a good compromise between speed and portability. NASM, as
of recent, fully supports the 64-bit architecture expansion of the x86
(x86-64). NASM also employs less ambiguous RIP relative support which
differs from what its spin-offs, such as FASM and YASM, provide.

NASM has quite a few projects/packages that provide macro facilities
to clean up OS-specific details while keeping absolute control of the
program in your hands. One of these projects is called NASMX, which I
and another colleague work on from time to time. LINK:
http://www.asmcommunity.net/projects/nasmx/

Here is my gripe list about the other assemblers that have been
mentioned. These comments are not here to generate a flame war, and
are based on observable events and/or fact. In the end, I would
encourage you to try all of them for yourself and gather your own
opinion.

1.) MASM is (legally) a windows-only thing. The legality of its
biggest supporting package, MASM32, is questionable at best. MASM32
has, tentatively, been found to be an illegal redistribution of
Microsoft licensed software in Germany (DE). Beyond that, the supposed
agreement between the package author and Microsoft was negotiated with
Microsoft Australia (AU) and would only apply to that country/region.
The reality of the situation, however, is that MASM32 promotes
Microsoft material... and manages to stay under the radar despite its
author coupling MASM discussion/support with his extremist political
agendas. MASM32 does have lots of support, examples and tutorials that
would ease you in to Win32ASM development.

2.) FASM will only run on few x86-based operating systems, and a
handful of hobbyist OS projects that have "ported" it. Also, I have
heard that FASM 2 will have macro facilities that will be fairly/
completely incompatible with the current syntax. If I have
misunderstood this, or if this has changed since I was last informed,
please correct this. Other than that, FASM seems to draw upon a
fanatical crowd, for whatever the positive/negative aspects of such
are worth. The FASM user base is great, but the documentation is poor.

3.) YASM has not been through the years of hardening that NASM has.
We've even brought out a few design flaws/bugs in YASM just from
recently developing NASM further. YASM does accept AT&T/GAS syntax
along with NASM syntax; however, this divides development focus and
you have two things that are supported in good manner, whereas NASM
and GAS can focus on doing one thing great. There might be a few
things different about YASM that you may enjoy over NASM and others,
so go ahead and try it.

4.) HLA seems to enable you as much as it will limit you from really
learning assembly language. I have witnessed people, some of which
participate in newsgroups like this one, trying to move from HLA to
full assembly language and they seem to only have a basic
understanding of computers and programming. This might be more of a
reflection upon the user than language, since it allows those with
poor disposition for assembly language to thrive in HLA, but muddle
their way through full assembly language and more advanced programming
concepts in general.

5.) RosASM is constantly being pushed by its author, Rene "Betov"
Tournis, at the level of the previously mentioned assemblers where-as
it is realistically much more of a lower quality/class assembler.
RosASM is Win32/PE specific, does not support standard library
linking, enforces a mono-file (one huge file instead of functionality
divided modules) programming mentality, and it is notorious for
ignoring legitimate bug reports. Despite all of that, RosASM is still
an assembler and its user base does enjoy what it provides, so you may
as well.

6.) I have no opinion of GoASM, but I know a few experienced and
trustworthy programmers that use/like it, so I will proxy their
approval to you. I know the accompanying linker, GoLink, has some bugs
in it that need to be addressed... so keep that in mind if you intend
to use it.

Obviously, my vote is for NASM as it will run just about everywhere
you want it to. More importantly, it has good documentation, plenty of
examples floating around the internet, and it provides a fairly
consistent/intuitive syntax that will keep you focused on the task at
hand.

.



Relevant Pages

  • Re: Hey Mr. Hyde!
    ... fewer and fewer students get introduced to assembly language ... programming and, in fact, wind up with four years' of instructors telling ... It really isn't Randy Hyde, Universities, OSes, or high-level assemblers ...
    (alt.lang.asm)
  • Re: HLA History
    ... >> meaning of the brackets in the Intel Syntax. ... NASM uses a more "traditional" assembly language syntax. ... People claiming that their assemblers are "Intel Syntax" compatible ... suitable for handling HLA output. ...
    (alt.lang.asm)
  • Re: Ten years later
    ... assembly language source code should be written in a completely ... would hope that the influence of a HLL-like programming style will ... assemblers around here. ... The same can be said for FASM. ...
    (alt.lang.asm)
  • Re: HLA v1.86 is now available
    ... I believe there was a book written for the early IBM assemblers ... Windows program in assembly. ... So no one has learned Win32 programming in assembly language since I ...
    (alt.lang.asm)
  • Re: which book to start with...?
    ... so if i start with Duntemann's book and later have to do some low-level stuff and DosEmu stops me, ... I like Nasm, and I don't think you'd go wrong with it. ... If you're going to "get into" the Linux code, you'll want to know at least a little Gas... ... Might help you compare assemblers to see which you prefer, ...
    (alt.lang.asm)