For Windows 10, how do I fix the error: 'Could not load file OR assembly 'MOM.Implementation' or one of its dependencies. The system cannot find the file specified.' Other answers are for Windows 8 or before. Here we will be demonstrating Assembly programming using MASM as it is the Microsoft assembler and provide much flexibility when it comes to development on Windows environment over various other assemblers like NASM etc. Required Tools: MASM Reference 2 - MASM is a Microsoft assembler. WinAsm Reference 3 - WinAsm is IDE. It provides a nice.
Developer(s) | Microsoft |
---|---|
Initial release | 1981; 39 years ago |
Stable release | |
Operating system | Microsoft Windows and MS-DOS |
Type | Assembler |
License | |
Website | docs.microsoft.com/en-us/cpp/assembler/masm/microsoft-macro-assembler-reference |
The Microsoft Macro Assembler (MASM) is an x86assembler that uses the Intel syntax for MS-DOS and Microsoft Windows. Beginning with MASM 8.0, there are two versions of the assembler: One for 16-bit & 32-bit assembly sources, and another (ML64) for 64-bit sources only.
MASM is maintained by Microsoft, 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.
History[edit]
The earliest versions of MASM date back to 1981.[1] They were sold either as the generic 'Microsoft Macro Assembler' for all x86 machines or as the OEM version specifically for IBM PCs. 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 application only. Versions 5.1 and 6.0 were available as both MS-DOS and OS/2 applications.[2]
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[how?][clarification needed] to be compatible with code produced by Visual C++. 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 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 and included some AMD-specific instructions.[3]
In 1999, Intel released macros for SIMD 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 toolset. Though it was still compatible with Windows 98, current versions of Visual Studio were not.[3] Support for 64-bit processors was not added until the release of Visual Studio 2005, 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[edit]
Early versions of MASM generated object modules using the OMF format, which was used to create binaries for MS-DOS or OS/2.
Since version 6.1, MASM is able to produce object modules in the Portable Executable[4][5] (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[edit]
Some other assemblers can assemble most code written for MASM, with the exception of more complex macros.
- Turbo Assembler (TASM) developed by Borland, later owned by Embarcadero, last updated in 2002, but still supplied with C++Builder and RAD Studio.
- JWASM Macro Assembler, licensed under the Sybase Open Watcom EULA.
- Pelle's Macro Assembler, a component of the Pelles C development environment.
- UASM is a free MASM-compatible assembler based on JWasm.
Mixed language programming support[edit]
Documentation for 1987's version 5.1 included support for 'Microsoft BASIC, C, FORTRAN, Pascal.'[6]
Licensing issues[edit]
Using MASM for operating system development is not prohibited in the license agreement although you may sometimes hear that. This is because people often confuse the MASM and MASM32 licenses; they are two unrelated projects.
See also[edit]
References[edit]
- ^Watt, Peggy; Christine McGeever (January 7, 1985). 'Macintosh Vs. IBM PC At One Year'. InfoWorld. Vol. 7 no. 1. pp. 15–16. ISSN0199-6649. The IBM PC Macro Assembler was released in December 1981.
- ^Marshall, Martin (April 29, 1991). 'Macro Assembler Update Adds High-Level Features'. InfoWorld. Vol. 13 no. 17. p. 21. ISSN0199-6649.
- ^ abR. E. Harvey (2007). 'Assemblers'. Archived from the original on 16 February 2008. Retrieved 4 February 2010.
- ^'Archived copy'. Archived from the original on 2009-01-26. Retrieved 2008-06-24.CS1 maint: archived copy as title (link)
- ^'WHDC White Papers and Documentation'. Retrieved 25 September 2016.
- ^Microsoft Macro Assembler 5.1, Mixed-Language Programming Guide. p. 3.
External links[edit]
Assembles and links one or more assembly-language source files. The command-line options are case-sensitive.
For more information on ml64.exe, see MASM for x64 (ml64.exe).
Syntax
ML [options] filename [ [options] filename]
ML64 [options] filename [ [options] filename] ... [/link link_options]
Parameters
options
The options listed in the following table.
Option | Action |
---|---|
/AT | Enables tiny-memory-model support. Enables error messages for code constructs that violate the requirements for .com format files. This option isn't equivalent to the .MODELTINY directive. Not available in ml64.exe. |
/Blfilename | Selects an alternate linker. |
/c | Assembles only. Does no linking. |
/coff | Generates common object file format (COFF) type of object module. Required for Win32 assembly language development. Not available in ml64.exe. |
/Cp | Preserves case of all user identifiers. |
/Cu | Maps all identifiers to upper case (default). Not available in ml64.exe. |
/Cx | Preserves case in public and extern symbols. |
/Dsymbol⟦=value⟧ | Defines a text macro with the given name. If value is missing, it's blank. Multiple tokens separated by spaces must be enclosed in quotation marks. |
/EP | Generates a preprocessed source listing (sent to STDOUT). See /Sf. |
/ERRORREPORT [ NONE | PROMPT | QUEUE | SEND ] | Deprecated. Error reporting is controlled by Windows Error Reporting (WER) settings. |
/Fhexnum | Sets stack size to hexnum bytes (the same as /link /STACK:number). The value must be expressed in hexadecimal notation. There must be a space between /F and hexnum. |
/Fefilename | Names the executable file. |
/Fl⟦filename⟧ | Generates an assembled code listing. See /Sf. |
/Fm⟦filename⟧ | Creates a linker map file. |
/Fofilename | Names an object file. For more information, see Remarks. |
/FPi | Generates emulator fix-ups for floating-point arithmetic (mixed language only). Not available in ml64.exe. |
/Fr⟦filename⟧ | Generates a source browser .sbr file. |
/FR⟦filename⟧ | Generates an extended form of a source browser .sbr file. |
/Gc | Specifies use of FORTRAN- or Pascal-style function calling and naming conventions. Same as OPTION LANGUAGE:PASCAL. Not available in ml64.exe. |
/Gd | Specifies use of C-style function calling and naming conventions. Same as OPTION LANGUAGE:C. Not available in ml64.exe. |
/GZ | Specifies use of __stdcall function calling and naming conventions. Same as OPTION LANGUAGE:STCALL. Not available in ml64.exe. |
/Hnumber | Restricts external names to number significant characters. The default is 31 characters. Not available in ml64.exe. |
/help | Calls QuickHelp for help on ML. |
/Ipathname | Sets path for include file. A maximum of 10 /I options is allowed. |
/nologo | Suppresses messages for successful assembly. |
/omf | Generates object module file format (OMF) type of object module. /omf implies /c; ML.exe doesn't support linking OMF objects. Not available in ml64.exe. |
/Sa | Turns on listing of all available information. |
/safeseh | Marks the object as either containing no exception handlers or containing exception handlers that are all declared with .SAFESEH. Not available in ml64.exe. |
/Sf | Adds first-pass listing to listing file. |
/Slwidth | Sets the line width of source listing in characters per line. Range is 60 to 255 or 0. Default is 0. Same as PAGE width. |
/Sn | Turns off symbol table when producing a listing. |
/Splength | Sets the page length of source listing in lines per page. Range is 10 to 255 or 0. Default is 0. Same as PAGE length. |
/Sstext | Specifies text for source listing. Same as SUBTITLE text. |
/Sttext | Specifies title for source listing. Same as TITLE text. |
/Sx | Turns on false conditionals in listing. |
/Tafilename | Assembles source file whose name doesn't end with the .asm extension. |
/w | Same as /W0/WX. |
/Wlevel | Sets the warning level, where level = 0, 1, 2, or 3. |
/WX | Returns an error code if warnings are generated. |
/X | Ignore INCLUDE environment path. |
/Zd | Generates line-number information in object file. |
/Zf | Makes all symbols public. |
/Zi | Generates CodeView information in object file. |
/Zm | EnablesM510 option for maximum compatibility with MASM 5.1. Not available in ml64.exe. |
/Zp⟦alignment⟧ | Packs structures on the specified byte boundary. The alignment can be 1, 2, or 4. |
/Zs | Performs a syntax check only. |
/? | Displays a summary of ML command-line syntax. |
filename
The name of the file.
For Windows 10, how do I fix the error: 'Could not load file OR assembly 'MOM.Implementation' or one of its dependencies. The system cannot find the file specified.' Other answers are for Windows 8 or before. Here we will be demonstrating Assembly programming using MASM as it is the Microsoft assembler and provide much flexibility when it comes to development on Windows environment over various other assemblers like NASM etc. Required Tools: MASM Reference 2 - MASM is a Microsoft assembler. WinAsm Reference 3 - WinAsm is IDE. It provides a nice.
Developer(s) | Microsoft |
---|---|
Initial release | 1981; 39 years ago |
Stable release | |
Operating system | Microsoft Windows and MS-DOS |
Type | Assembler |
License | |
Website | docs.microsoft.com/en-us/cpp/assembler/masm/microsoft-macro-assembler-reference |
The Microsoft Macro Assembler (MASM) is an x86assembler that uses the Intel syntax for MS-DOS and Microsoft Windows. Beginning with MASM 8.0, there are two versions of the assembler: One for 16-bit & 32-bit assembly sources, and another (ML64) for 64-bit sources only.
MASM is maintained by Microsoft, 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.
History[edit]
The earliest versions of MASM date back to 1981.[1] They were sold either as the generic 'Microsoft Macro Assembler' for all x86 machines or as the OEM version specifically for IBM PCs. 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 application only. Versions 5.1 and 6.0 were available as both MS-DOS and OS/2 applications.[2]
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[how?][clarification needed] to be compatible with code produced by Visual C++. 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 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 and included some AMD-specific instructions.[3]
In 1999, Intel released macros for SIMD 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 toolset. Though it was still compatible with Windows 98, current versions of Visual Studio were not.[3] Support for 64-bit processors was not added until the release of Visual Studio 2005, 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[edit]
Early versions of MASM generated object modules using the OMF format, which was used to create binaries for MS-DOS or OS/2.
Since version 6.1, MASM is able to produce object modules in the Portable Executable[4][5] (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[edit]
Some other assemblers can assemble most code written for MASM, with the exception of more complex macros.
- Turbo Assembler (TASM) developed by Borland, later owned by Embarcadero, last updated in 2002, but still supplied with C++Builder and RAD Studio.
- JWASM Macro Assembler, licensed under the Sybase Open Watcom EULA.
- Pelle's Macro Assembler, a component of the Pelles C development environment.
- UASM is a free MASM-compatible assembler based on JWasm.
Mixed language programming support[edit]
Documentation for 1987's version 5.1 included support for 'Microsoft BASIC, C, FORTRAN, Pascal.'[6]
Licensing issues[edit]
Using MASM for operating system development is not prohibited in the license agreement although you may sometimes hear that. This is because people often confuse the MASM and MASM32 licenses; they are two unrelated projects.
See also[edit]
References[edit]
- ^Watt, Peggy; Christine McGeever (January 7, 1985). 'Macintosh Vs. IBM PC At One Year'. InfoWorld. Vol. 7 no. 1. pp. 15–16. ISSN0199-6649. The IBM PC Macro Assembler was released in December 1981.
- ^Marshall, Martin (April 29, 1991). 'Macro Assembler Update Adds High-Level Features'. InfoWorld. Vol. 13 no. 17. p. 21. ISSN0199-6649.
- ^ abR. E. Harvey (2007). 'Assemblers'. Archived from the original on 16 February 2008. Retrieved 4 February 2010.
- ^'Archived copy'. Archived from the original on 2009-01-26. Retrieved 2008-06-24.CS1 maint: archived copy as title (link)
- ^'WHDC White Papers and Documentation'. Retrieved 25 September 2016.
- ^Microsoft Macro Assembler 5.1, Mixed-Language Programming Guide. p. 3.
External links[edit]
Assembles and links one or more assembly-language source files. The command-line options are case-sensitive.
For more information on ml64.exe, see MASM for x64 (ml64.exe).
Syntax
ML [options] filename [ [options] filename]
ML64 [options] filename [ [options] filename] ... [/link link_options]
Parameters
options
The options listed in the following table.
Option | Action |
---|---|
/AT | Enables tiny-memory-model support. Enables error messages for code constructs that violate the requirements for .com format files. This option isn't equivalent to the .MODELTINY directive. Not available in ml64.exe. |
/Blfilename | Selects an alternate linker. |
/c | Assembles only. Does no linking. |
/coff | Generates common object file format (COFF) type of object module. Required for Win32 assembly language development. Not available in ml64.exe. |
/Cp | Preserves case of all user identifiers. |
/Cu | Maps all identifiers to upper case (default). Not available in ml64.exe. |
/Cx | Preserves case in public and extern symbols. |
/Dsymbol⟦=value⟧ | Defines a text macro with the given name. If value is missing, it's blank. Multiple tokens separated by spaces must be enclosed in quotation marks. |
/EP | Generates a preprocessed source listing (sent to STDOUT). See /Sf. |
/ERRORREPORT [ NONE | PROMPT | QUEUE | SEND ] | Deprecated. Error reporting is controlled by Windows Error Reporting (WER) settings. |
/Fhexnum | Sets stack size to hexnum bytes (the same as /link /STACK:number). The value must be expressed in hexadecimal notation. There must be a space between /F and hexnum. |
/Fefilename | Names the executable file. |
/Fl⟦filename⟧ | Generates an assembled code listing. See /Sf. |
/Fm⟦filename⟧ | Creates a linker map file. |
/Fofilename | Names an object file. For more information, see Remarks. |
/FPi | Generates emulator fix-ups for floating-point arithmetic (mixed language only). Not available in ml64.exe. |
/Fr⟦filename⟧ | Generates a source browser .sbr file. |
/FR⟦filename⟧ | Generates an extended form of a source browser .sbr file. |
/Gc | Specifies use of FORTRAN- or Pascal-style function calling and naming conventions. Same as OPTION LANGUAGE:PASCAL. Not available in ml64.exe. |
/Gd | Specifies use of C-style function calling and naming conventions. Same as OPTION LANGUAGE:C. Not available in ml64.exe. |
/GZ | Specifies use of __stdcall function calling and naming conventions. Same as OPTION LANGUAGE:STCALL. Not available in ml64.exe. |
/Hnumber | Restricts external names to number significant characters. The default is 31 characters. Not available in ml64.exe. |
/help | Calls QuickHelp for help on ML. |
/Ipathname | Sets path for include file. A maximum of 10 /I options is allowed. |
/nologo | Suppresses messages for successful assembly. |
/omf | Generates object module file format (OMF) type of object module. /omf implies /c; ML.exe doesn't support linking OMF objects. Not available in ml64.exe. |
/Sa | Turns on listing of all available information. |
/safeseh | Marks the object as either containing no exception handlers or containing exception handlers that are all declared with .SAFESEH. Not available in ml64.exe. |
/Sf | Adds first-pass listing to listing file. |
/Slwidth | Sets the line width of source listing in characters per line. Range is 60 to 255 or 0. Default is 0. Same as PAGE width. |
/Sn | Turns off symbol table when producing a listing. |
/Splength | Sets the page length of source listing in lines per page. Range is 10 to 255 or 0. Default is 0. Same as PAGE length. |
/Sstext | Specifies text for source listing. Same as SUBTITLE text. |
/Sttext | Specifies title for source listing. Same as TITLE text. |
/Sx | Turns on false conditionals in listing. |
/Tafilename | Assembles source file whose name doesn't end with the .asm extension. |
/w | Same as /W0/WX. |
/Wlevel | Sets the warning level, where level = 0, 1, 2, or 3. |
/WX | Returns an error code if warnings are generated. |
/X | Ignore INCLUDE environment path. |
/Zd | Generates line-number information in object file. |
/Zf | Makes all symbols public. |
/Zi | Generates CodeView information in object file. |
/Zm | EnablesM510 option for maximum compatibility with MASM 5.1. Not available in ml64.exe. |
/Zp⟦alignment⟧ | Packs structures on the specified byte boundary. The alignment can be 1, 2, or 4. |
/Zs | Performs a syntax check only. |
/? | Displays a summary of ML command-line syntax. |
filename
The name of the file.
Assembler For Windows 10
link_options
The link options. For more information, see Linker options.
Remarks
Some command-line options to ML and ML64 are placement-sensitive. For example, because ML and ML64 can accept several /c options, any corresponding /Fo options must be specified before /c. The following command-line example illustrates an object file specification for each assembly file specification:
Microsoft Assembler X64
Environment Variables
Variable | Description |
---|---|
INCLUDE | Specifies search path for include files. |
ML | Specifies default command-line options. |
TMP | Specifies path for temporary files. |
Turbo Assembler For Windows 10
See also
ML Error Messages
Microsoft Macro Assembler Reference