HOME

TheInfoList



OR:

The Microsoft Macro Assembler (MASM) is an
x86 x86 (also known as 80x86 or the 8086 family) is a family of complex instruction set computer (CISC) instruction set architectures initially developed by Intel based on the Intel 8086 microprocessor and its 8088 variant. The 8086 was introd ...
assembler Assembler may refer to: Arts and media * Nobukazu Takemura, avant-garde electronic musician, stage name Assembler * Assemblers, a fictional race in the ''Star Wars'' universe * Assemblers, an alternative name of the superhero group Champions of ...
that uses the Intel syntax for
MS-DOS MS-DOS ( ; acronym for Microsoft Disk Operating System, also known as Microsoft DOS) is an operating system for x86-based personal computers mostly developed by Microsoft. Collectively, MS-DOS, its rebranding as IBM PC DOS, and a few oper ...
and
Microsoft Windows Windows is a group of several proprietary graphical operating system families developed and marketed by Microsoft. Each family caters to a certain sector of the computing industry. For example, Windows NT for consumers, Windows Server for se ...
. Beginning with MASM 8.0, there are two versions of the assembler: One for
16-bit 16-bit microcomputers are microcomputers that use 16-bit microprocessors. A 16-bit register can store 216 different values. The range of integer values that can be stored in 16 bits depends on the integer representation used. With the two mos ...
&
32-bit In computer architecture, 32-bit computing refers to computer systems with a processor, memory, and other major system components that operate on data in 32-bit units. Compared to smaller bit widths, 32-bit computers can perform large calculati ...
assembly sources, and another (ML64) for
64-bit In computer architecture, 64-bit integers, memory addresses, or other data units are those that are 64 bits wide. Also, 64-bit CPUs and ALUs are those that are based on processor registers, address buses, or data buses of that size. A comput ...
sources only. MASM is maintained by
Microsoft Microsoft Corporation is an American multinational technology corporation producing computer software, consumer electronics, personal computers, and related services headquartered at the Microsoft Redmond campus located in Redmond, Washingt ...
, but since version 6.12 it has not been sold as a separate product. It is instead supplied with various Microsoft SDKs and C compilers. Recent versions of MASM are included with
Microsoft Visual Studio Visual Studio is an integrated development environment (IDE) from Microsoft. It is used to develop computer programs including web site, websites, web apps, web services and mobile apps. Visual Studio uses Microsoft software development platfor ...
.


History

The earliest versions of MASM date back to 1981. The IBM PC Macro Assembler was released in December 1981. They were sold either as the generic "Microsoft Macro Assembler" for all x86 machines or as the OEM version specifically for
IBM PC The IBM Personal Computer (model 5150, commonly known as the IBM PC) is the first microcomputer released in the IBM PC model line and the basis for the IBM PC compatible de facto standard. Released on August 12, 1981, it was created by a team ...
s. By Version 4.0, the IBM release was dropped. Up to Version 3.0, MASM was also bundled with a smaller companion assembler, ASM.EXE. This was intended for PCs with only 64k of memory and lacked some features of the full MASM, such as the ability to use code macros. MS-DOS versions up to 4.x included Microsoft's LINK utility, which was designed to convert intermediate OBJ files generated by MASM and other compilers; however, as users who did not program had no use of the utility, it was moved to their compiler packages. Version 4.0 added support for 286 instructions and also shorthand mnemonics for segment descriptors (.code, .data, etc.). Version 5.0 supported 386 instructions, but it could still only generate real mode executables. Through version 5.0, MASM was available as an
MS-DOS MS-DOS ( ; acronym for Microsoft Disk Operating System, also known as Microsoft DOS) is an operating system for x86-based personal computers mostly developed by Microsoft. Collectively, MS-DOS, its rebranding as IBM PC DOS, and a few oper ...
application only. Versions 5.1 and 6.0 were available as both
MS-DOS MS-DOS ( ; acronym for Microsoft Disk Operating System, also known as Microsoft DOS) is an operating system for x86-based personal computers mostly developed by Microsoft. Collectively, MS-DOS, its rebranding as IBM PC DOS, and a few oper ...
and
OS/2 OS/2 (Operating System/2) is a series of computer operating systems, initially created by Microsoft and IBM under the leadership of IBM software designer Ed Iacobucci. As a result of a feud between the two companies over how to position OS/2 re ...
applications. Version 6.0, released in 1992, added parameter passing with "invoke" and some other high level-like constructs, in addition to the already existing high level-like records, among other things. By the end of the year, version 6.1A updated the memory management to be compatible with code produced by
Visual C++ Microsoft Visual C++ (MSVC) is a compiler for the C, C++ and C++/CX programming languages by Microsoft. MSVC is proprietary software; it was originally a standalone product but later became a part of Visual Studio and made available in both tr ...
. In 1993 full support for protected mode 32-bit applications and the Pentium instruction set was added. The MASM binary at that time was shipped as a "bi-modal" DOS-extended binary (using the
Phar Lap Phar Lap (4 October 1926 – 5 April 1932) was a champion New Zealand–bred Thoroughbred racehorse who is widely regarded as New Zealand's greatest racehorse ever. Achieving incredible success during his distinguished career, his initial u ...
TNT DOS extender). Versions 6.12 to 6.14 were implemented as patches for version 6.11. These patches changed the type of the binary to native PE format. Version 6.11 is the last version of MASM that will run under MS-DOS. By the end of 1997, MASM fully supported
Windows 95 Windows 95 is a consumer-oriented operating system developed by Microsoft as part of its Windows 9x family of operating systems. The first operating system in the 9x family, it is the successor to Windows 3.1x, and was released to manufacturi ...
and included some
AMD Advanced Micro Devices, Inc. (AMD) is an American multinational semiconductor company based in Santa Clara, California, that develops computer processors and related technologies for business and consumer markets. While it initially manufact ...
-specific instructions. In 1999, Intel released macros for
SIMD Single instruction, multiple data (SIMD) is a type of parallel processing in Flynn's taxonomy. SIMD can be internal (part of the hardware design) and it can be directly accessible through an instruction set architecture (ISA), but it should ...
and MMX instructions, which were shortly thereafter supported natively by MASM. With the 6.15 release in 2000, Microsoft discontinued support for MASM as a separate product, instead subsuming it into the
Visual Studio Visual Studio is an integrated development environment (IDE) from Microsoft. It is used to develop computer programs including websites, web apps, web services and mobile apps. Visual Studio uses Microsoft software development platforms such a ...
toolset. Though it was still compatible with
Windows 98 Windows 98 is a consumer-oriented operating system developed by Microsoft as part of its Windows 9x family of Microsoft Windows operating systems. The second operating system in the 9x line, it is the successor to Windows 95, and was released t ...
, current versions of Visual Studio were not. Support for 64-bit processors was not added until the release of
Visual Studio 2005 Visual Studio is an integrated development environment (IDE) from Microsoft. It is used to develop computer programs including websites, web apps, web services and mobile apps. Visual Studio uses Microsoft software development platforms su ...
, with MASM 8.0. After 25 June 2015, there are at least three different MASMs with the version number 14.00.23026. In Microsoft Visual Studio 2015 Enterprise Edition, there is one "amd64_x86" ml and two ml64s, "x86_amd64" and "amd64". They run on different platforms targeting different platforms: * amd64_x86: generates 64-bit code, runs in a Windows 32-bit environment * x86_amd64: generates 32-bit code, runs in a Windows 64-bit environment * amd64: generates 64-bit code, runs in a Windows 64-bit environment


Object module formats supported by MASM

Early versions of MASM generated object modules using the OMF format, which was used to create binaries for
MS-DOS MS-DOS ( ; acronym for Microsoft Disk Operating System, also known as Microsoft DOS) is an operating system for x86-based personal computers mostly developed by Microsoft. Collectively, MS-DOS, its rebranding as IBM PC DOS, and a few oper ...
or
OS/2 OS/2 (Operating System/2) is a series of computer operating systems, initially created by Microsoft and IBM under the leadership of IBM software designer Ed Iacobucci. As a result of a feud between the two companies over how to position OS/2 re ...
. Since version 6.1, MASM is able to produce object modules in the
Portable Executable The Portable Executable (PE) format is a file format for executables, object code, DLLs and others used in 32-bit and 64-bit versions of Windows operating systems. The PE format is a data structure that encapsulates the information necessary fo ...
(PE/COFF) format. PE/COFF is compatible with recent Microsoft C compilers, and object modules produced by either MASM or the C compiler can be routinely intermixed and linked into Win32 and Win64 binaries.


Assemblers compatible with MASM

Some other assemblers can assemble most code written for MASM, with the exception of more complex macros. *
Turbo Assembler Turbo Assembler (sometimes shortened to the name of the executable, TASM) is an assembler for software development published by Borland in 1989. It runs on and produces code for 16- or 32-bit x86 MS-DOS and compatible on Microsoft Windows. It c ...
(TASM) developed by Borland, later owned by Embarcadero, last updated in 2002, but still supplied with
C++Builder C++Builder is a rapid application development (RAD) environment, originally developed by Borland and owned by Embarcadero Technologies (a subsidiary of Idera), for writing programs in the C++ programming language currently targeting Windows (bo ...
an
RAD Studio
*
JWasm Open Watcom Assembler or WASM is an x86 assembler produced by Watcom, based on the Watcom Assembler found in Watcom C/C++ compiler and Watcom FORTRAN 77. Further development is being done on the 32- and 64-bit JWASM project,. which more closely ...
Macro Assembler, licensed under the Sybase Open Watcom EULA. Last updated in 2014. * Pelle's Macro Assembler, a component of th
Pelles C
development environment.

is a free MASM-compatible assembler based on JWasm.
ASMC
is a free MASM-compatible assembler based on JWasm.


Mixed language programming support

Documentation for 1987's version 5.1 included support for "Microsoft BASIC, C, FORTRAN, Pascal."


See also

*
Microsoft MACRO-80 Microsoft MACRO-80 (often shortened to M80) is a relocatable macro assembler for Intel 8080 and Zilog Z80 microcomputer systems. The complete MACRO-80 package includes the ''MACRO-80 Assembler'', the ''LINK-80 Linking Loader'', and the ''CREF-80 ...
*
Assembly language In computer programming, assembly language (or assembler language, or symbolic machine code), often referred to simply as Assembly and commonly abbreviated as ASM or asm, is any low-level programming language with a very strong correspondence b ...
*
High-level assembler A high-level assembler in computing is an assembler for assembly language that incorporate features found in a high-level programming language. The earliest high-level assembler was probably Burroughs' Executive Systems Problem Oriented Language ...
* Comparison of assemblers


References


External links

*
Intro to MASM Win32

Masm32 project
{{X86 assembly topics 1981 software Assemblers Microsoft development tools DOS software Programming tools for Windows