ASM: MASM, NASM, FASM?
Asked Answered
F

1

40

I have done ARM assembly programming and I would like to learn the Intel Assembler. I keep hearing all these different F/M/N/ASMs mentioned- but I am unsure how they related to what I wish to achieve?

Could somebody please help me identify what I would need to learn how to program low level on the Intel architecture? I dont quite understand how the "different Assemblers" correlate, even more so with x86, IA64, AMD64/x86-64 etc?

If it is of any help, I am most comfortable with Eclipse and Visual Studio 08/10 IDEs.

Fate answered 16/4, 2012 at 18:55 Comment(2)
Depends somewhat on your preferred OS - Windows ? Linux ? Mac OS X ? Other ?Phineas
What would be used for Mac OS X?Extramarital
C
30

MASM (Microsoft Assembler) is the popular assembler for Windows. MASM is for 16-bit and 32-bit applications(x86). ML64 is the one for 64 bit sources (AMD64/x86-64)

NASM (Netwide Assembler) is the popular assembler for Linux but is available on Windows too. NASM supports 16-bit, 32 bit and 64 bit programs.

FASM (Flat Assembler) is available for both Windows and Linux. FASM too supports both 32-bit and 64-bit programs.

So I guess you would prefer choosing MASM according to your requirements.

Centromere answered 16/4, 2012 at 19:0 Comment(9)
NASM is also available for Windows.Gordy
Thanks Pavan. Are there any differences in the syntax?Fate
@Fate Yes. Read the differences between MASM and NASM hereCentromere
NASM also supports 16 bit assembly, which is why I love it so much. :)Fuselage
NASM is also available on Mac OS X (and probably other platforms too)Phineas
I personally would like to put a good word in for FASM. It is so extensible it doesn't actually have to be limited to any of the architectures listed. For example you can use it as a fully working DCPU-16 assembler using macros.Baumgartner
Personally, I prefer FASM. As far as I know it can be used as a 16-bit assembler as well (originally it only ran in 16-bit flat real mode). I've also seen a DOS clone written in FASM. +1 for the good answer either way.Murraymurre
Sorry to interject six years later, but FASM does indeed assemble for 16-bit Intel x86.Jalopy
Even later. But there is also JWASM which uses the MASM syntax is nice because it has the same macros in 64 bit than in 32 bit. Meanwhile ML64 is very barebones when compared to its 32 bit counterpart. No .if, .else, .endif in ML64.EXE. (which ML.EXE does have)Astragalus

© 2022 - 2024 — McMap. All rights reserved.