Microsoft Macro Assembler

From Wikipedia, the free encyclopedia

The Microsoft Macro Assembler (abbreviated MASM) is an assembler for the x86 family of microprocessors. It was originally produced by Microsoft for development work on their MS-DOS operating system, and was for some time the most popular assembler available for that operating system. It supported a wide variety of macro facilities and structured programming idioms, including high-level constructions for looping, procedure calls and alternation (therefore, MASM is an example of a high-level assembler). Later versions added the capability of producing programs for the Windows operating systems that were released to follow on from MS-DOS. MASM is one of the few Microsoft development tools (another was NMAKE) for which one version targets both 16-bit and 32-bit. Early version were MS-DOS applications. Later versions also were OS/2 applications (versions 5.1 and 6.0) and later versions after that (versions 6.1+) were Win32 console applications (initially (in versions 6.1 and 6.11) with the Phar Lap TNT DOS extender included to run these versions of MS-DOS). However see Phar Lap (company) for the whole debacle that cause early versions that were Win32 console applications (version 6.1) to fail to run on final versions of Windows NT.

Contents

[edit] The competition

In the early 1990s, however, alternative assemblers such as Borland TASM, the shareware assembler A86, and (towards the end of the 90s) NASM began to take some of MASM's market share. However, two events in the late 1990's allowed MASM to retain much of its market share: first, Microsoft ceased selling MASM as a commercial product and began distributing it free of charge as part of the DDK (Driver Development Kit). Second, the MASM32 package and Iczelion's Win32 tutorials appeared, making Windows' application programming with MASM possible. Later in 2000, MASM 6.15 was released as part of the Visual C++ Processor Pack, which is free. As a result, all versions of Visual C++ later than 6.0, included a version of MASM equal to the version of Visual C++. Later in Visual C++ 2005, a 64-bit version of MASM appeared (file name is ml64.exe). Combined with the huge installed base of MASM users, these events helped stem the defection from MASM to other assemblers. Today, MASM is still the number one assembler on the Win32 platform, despite competition from new products such as NASM, FASM, GoAsm, and HLA.

[edit] Projects that support MASM

There are many on-going software development projects that support MASM, including IDEs (such as WinAsm Studio, RadASM), debuggers (such as OllyDbg), and disassemblers (including IDAPro, the Interactive Disassembler). The MASM32 project (http://www.movsd.com/) has put together a very impressive programmer's library, sample code respository, and impressive documentation for MASM users. MASM is also supported by a large number of web pages and support forums (including http://www.masmforum.com). Also, along the lines of products such as Visual Basic, or Visual C++, EasyCode is an IDE for the MASM laguage that provides these 'visual' capabilites. Despite the age of this product, it remains one of the most well-supported assemblers in existence.

[edit] MASM Versions

Though MASM is no longer a commercial product, Microsoft continues to support it because of the large base of assembly code that exists in-house at Microsoft. The last version of MASM that was sold as a separate package was version 6.11. Since Microsoft stopped selling MASM separately, they have released several updates to the MASM version 6.x product line. Version 6.15 was included in the Visual C++ 6.0 Processor Pack. Version 7.0 was included with Visual C++ .NET 2002. Version 7.1 was included with Visual C++ .NET 2003. Version 8.0 was included with Visual C++ 2005 which also includes a version that can assemble x64 code. For the version included with newer Visual C++ versions, look for the file ml.exe in the Visual C++ bin directory, and for the version that can assemble x64 code included in Visual C++ 2005, look for the file ml64.exe in the same directory. Documentation for the versions included with newer Visual C++ versions is part of the documentation for that version. Some of the newer versions of MASM are also included in various Microsoft SDKs and DDKs.

[edit] Support

Though rumors exist that Microsoft no longer support and develop MASM, the truth is that Microsoft does continue to support and develop this product. Generally, though, the support is limited to adding new instructions as newer processors appear and improving 64-bit support; beyond this radical changes to the assembler will not be seen.

[edit] See also

[edit] External links