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.
As it seems, MASM32 is a whole SDK with editor etc. What you can download here is just the assembler itself for use together with Visual C++ 2005 Express Edition (read under "System requirements"). So if you wanna start just from zero, download the MASM32 Sdk which is, as far as I guess, better suited for beginners. Just read this page here to get more information about MASM.
MASM32 is an entire SDK, like joni said. It contains an editor, some help files, and basically everything you need to code in the MASM language. Also, it's worth noting that MASM32 does indeed contain version 8 of MASM; you're not missing anything. I personally recommend MASM32 as a package, it makes starting off in MASM much easier, but you can do it all from scratch and use just the original MASM assembler and figure it out from there.
精彩评论