I am trying to learn assembly for windows and see that there are 2 assemblers:
masm : https://www.microsoft.com/downloads/en/details.aspx?FamilyID=7a1c9da0-0510-44a2-b042-7ef370530c64
masm32 : http://masm32.com/index.htm
are these equivalent? which one should i choose to learn assembly for windows?
It's both MASM (apparently), just different versions. I'd normally use the official (MS) link.
MASM is also part of the Windows SDK now - if you install it, it contains ML.exe
in the bin
directory.
If you're just using it to learn assembly language, the MASM version used doesn't make much of a difference. Newer versions of MASM add support for 64 bits (ML64.exe
) and newer instructions as they get added to the x86 instruction set, but that's about it. The main differences between different assemblers are the different dialects. There's 3 main dialects of x86 assembly language: MASM syntax, NASM syntax and Unix-style as
syntax (there also used to be Borland TASM, but that's pretty much dead nowadays). MASM, NASM and YASM all use the same instruction and register names but have some slightly differing conventions (dword ptr [blah]
vs. dword [blah]
etc.) and quite different macro languages. MASM also has some higher-level constructs like .if
/ .endif
, invoke
etc. that don't exist in other Assemblers. Whether that's an advantage or not is a matter of taste, I personally prefer the NASM style syntax because it's more regular and I find the macro preprocessor more convenient to use, but that's a matter of taste.
as
is a different matter. It uses a completely different syntax and instruction names that differ from what's given in the Intel manuals. It's the default on most Unix variants (and also in compilers that come from that environment, e.g. GCC) but basically unused outside that environment. Current versions of GNU as
support Intel syntax too, which makes most of the syntactic differences go away, but as
in general is mainly intended as a backend assembler for compilers and not a fullly-fledged macro assembler, so it still has a very limited featureset compared to MASM or NASM/YASM.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With