Jump to content

Microsoft Macro Assembler: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Line 27: Line 27:
==External links==
==External links==
* [http://masm32.com MASM32 Homepage] also hosts [http://masm32.com/board/ the MASM discussion forum]
* [http://masm32.com MASM32 Homepage] also hosts [http://masm32.com/board/ the MASM discussion forum]
* [http://www.winasm.net WinAsm Studio IDE - Assembly forum, open source projects]
* [http://www.sourcerip.com Free MASM Source Code]
* [http://www.sourcerip.com Free MASM Source Code]
* [http://www.microsoft.com/downloads/details.aspx?FamilyID=7A1C9DA0-0510-44A2-B042-7EF370530C64 MASM download for Visual C++ 2005 Express Edition]
* [http://www.microsoft.com/downloads/details.aspx?FamilyID=7A1C9DA0-0510-44A2-B042-7EF370530C64 MASM download for Visual C++ 2005 Express Edition]

Revision as of 09:08, 5 July 2007

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.

The competition

In the early 1990s 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 and Yasm, FASM, GoAsm, and HLA. Along with GoAsm there are two other assemblers in direct competition as they are specifically designed for the Windows environment: RosASM, a monolithic assembler IDE developed for but independent from the ReactOS project, and POASM, the assembler back end found in the Pelles C software development toolchain. The former is a radical departure from MASM, with its bottom-up approach (stripped down syntax and less high level capabilities), monolithic design with rather quirky sub-programs and lack of static linking. However, it is distributed under the GPL license. The latter tries to stay as close to MASM's syntax, design and capabilities, and although it is not open source, it is freeware as well, and doesn't contain the prohibition to develop commercial software with the package.

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 an extensive programmer's library, sample code repository, and 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 language that provides these 'visual' capabilities. Despite the age of this product, it remains one of the most well-supported assemblers in existence.

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. Future version of MASM are going to be shipped with future versions of Visual C++.

Support

Though rumors exist that Microsoft no longer supports and develops 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.

See also