Difference between masm32 and masm?
Asked Answered
B

3

7

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?

Bolding answered 2/11, 2010 at 8:8 Comment(0)
T
4

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.

Tace answered 2/11, 2010 at 8:34 Comment(4)
If i understood correctly, then MASM 6.1 is packaged with masm32 right? and the official microsoft link is for MASM 8.0? Is this correct?Bolding
While tasm is fairly dead, Delphi and Free Pascal's internal assembler (the so called BASM, but with TASM style) is still alive. But Embarcadero decided to can it for 64-bitSabrasabre
@Jumbo: No idea what's in the MASM32 package, but the MS link you posted is MASM 8.0, yes. Current versions of the Windows SDK ship with MASM 9.0. (Or maybe even newer, haven't downloaded a new SDK in a while).Tace
@Marco: There's no significant difference (that I can think of) between BASM and MS-style inline ASM in VC++, and both are a small subset of MASM style syntax. TASM was mostly MASM-compatible to begin with, and all of the real differences are in Macro assembler features (TASM has ideal mode and the macro preprocessor works slightly differently if I recall correctly) that you can't access in inline ASM in the first place.Tace
D
1

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.

Denman answered 2/11, 2010 at 8:21 Comment(0)
T
1

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.

Titillate answered 28/6, 2011 at 20:15 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.