Microsoft Assembler For Windows 10



The Microsoft Macro Assembler (MASM) provides several advantages over inline assembly. MASM contains a macro language that has features such as looping, arithmetic, and text string processing. MASM also gives you greater control over the hardware because it supports the instruction sets of the 386, 486, and Pentium processors. This is the project webpage for the Netwide Assembler (NASM), an asssembler for the x86 CPU architecture portable to nearly every modern platform, and with code generation for many platforms old and new. As of version 2.07, NASM is now under the Simplified (2-clause) BSD license. The details of the license are available in the.

-->

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.

OptionAction
/ATEnables 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.
/BlfilenameSelects an alternate linker.
/cAssembles only. Does no linking.
/coffGenerates common object file format (COFF) type of object module. Required for Win32 assembly language development.
Not available in ml64.exe.
/CpPreserves case of all user identifiers.
/CuMaps all identifiers to upper case (default).
Not available in ml64.exe.
/CxPreserves case in public and extern symbols.
/Dsymbol⟦=valueDefines 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.
/EPGenerates 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.
/FhexnumSets 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.
/FefilenameNames the executable file.
/FlfilenameGenerates an assembled code listing. See /Sf.
/FmfilenameCreates a linker map file.
/FofilenameNames an object file. For more information, see Remarks.
/FPiGenerates emulator fix-ups for floating-point arithmetic (mixed language only).
Not available in ml64.exe.
/FrfilenameGenerates a source browser .sbr file.
/FRfilenameGenerates an extended form of a source browser .sbr file.
/GcSpecifies use of FORTRAN- or Pascal-style function calling and naming conventions. Same as OPTION LANGUAGE:PASCAL.
Not available in ml64.exe.
/GdSpecifies use of C-style function calling and naming conventions. Same as OPTION LANGUAGE:C.
Not available in ml64.exe.
/GZSpecifies use of __stdcall function calling and naming conventions. Same as OPTION LANGUAGE:STCALL.
Not available in ml64.exe.
/HnumberRestricts external names to number significant characters. The default is 31 characters.
Not available in ml64.exe.
/helpCalls QuickHelp for help on ML.
/IpathnameSets path for include file. A maximum of 10 /I options is allowed.
/nologoSuppresses messages for successful assembly.
/omfGenerates 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.
/SaTurns on listing of all available information.
/safesehMarks the object as either containing no exception handlers or containing exception handlers that are all declared with .SAFESEH.
Not available in ml64.exe.
/SfAdds first-pass listing to listing file.
/SlwidthSets the line width of source listing in characters per line. Range is 60 to 255 or 0. Default is 0. Same as PAGE width.
/SnTurns off symbol table when producing a listing.
/SplengthSets the page length of source listing in lines per page. Range is 10 to 255 or 0. Default is 0. Same as PAGE length.
/SstextSpecifies text for source listing. Same as SUBTITLE text.
/SttextSpecifies title for source listing. Same as TITLE text.
/SxTurns on false conditionals in listing.
/TafilenameAssembles source file whose name doesn't end with the .asm extension.
/wSame as /W0/WX.
/WlevelSets the warning level, where level = 0, 1, 2, or 3.
/WXReturns an error code if warnings are generated.
/XIgnore INCLUDE environment path.
/ZdGenerates line-number information in object file.
/ZfMakes all symbols public.
/ZiGenerates CodeView information in object file.
/ZmEnablesM510 option for maximum compatibility with MASM 5.1.
Not available in ml64.exe.
/ZpalignmentPacks structures on the specified byte boundary. The alignment can be 1, 2, or 4.
/ZsPerforms a syntax check only.
/?Displays a summary of ML command-line syntax.

filename
The name of the file.

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:

Environment Variables

VariableDescription
INCLUDESpecifies search path for include files.
MLSpecifies default command-line options.
TMPSpecifies path for temporary files.

See also

Windows

Microsoft Macro Assembler

Assembler

ML Error Messages
Microsoft Macro Assembler Reference

Best Assembler Windows

-->

This article describes how to install an assembly .dll file in the Microsoft .NET Framework global assembly cache, and create an assembly that has a strong name by using Visual Studio.

Original product version: .NET Framework, Visual Studio
Original KB number: 910355

Summary

To install an assembly .dll file in the .NET Framework global assembly cache, you can use the .NET Framework SDK Global Assembly Cache tool. You can also use the Global Assembly Cache tool to verify that the assembly is installed in the global assembly cache. To accomplish this task, you may have Administrator rights to the computer where the shared assembly is installed. What's more, you must install the .NET Framework SDK.

For a Visual C# .NET version of this article, see How to install an assembly into the Global Assembly Cache in Visual C#.

Global assembly cache

The .NET Framework global assembly cache is a code cache. The global assembly cache is automatically installed on each computer that has the .NET Framework common language runtime installed. Any application that is installed on the computer can access the global assembly cache. The global assembly cache stores assemblies that are designated to be shared by several applications on the computer. Component assemblies are typically stored in the C:WINNTAssembly folder.

Note

Only install an assembly in the global assembly cache when you need to share the assembly. Unless sharing an assembly is explicitly required, we recommend you keep assembly dependencies private and that you locate the assembly in the application directory. Additionally, you don't have to install an assembly in the global assembly cache to make the assembly available to Microsoft Component Object Model (COM) interop or to un-managed code.

An assembly

An assembly is a fundamental part of programming with the .NET Framework. An assembly is a reusable, self-describing building block of a .NET Framework common language runtime application.

An assembly contains one or more code components that the common language runtime executes. All types and all resources in the same assembly form an individual version of the unit. The assembly manifest describes the version dependencies that you specify for any dependent assemblies. By using an assembly, you can specify version rules between different software components, and you can have those rules enforced at run time. An assembly supports side-by-side execution. WHich enables multiple versions to run at the same time.

Strong-name signing

An assembly must have a strong name to be installed in the global assembly cache. A strong name is a globally unique identity that can't be spoofed by someone else. By using a strong name, you prevent components that have the same name from conflicting with each other or from being used incorrectly by a calling application. Assembly signing associates a strong name together with an assembly. Assembly signing is also named strong-name signing. A strong name consists of the following information:

  • The simple text name of the assembly
  • The version number of the assembly
  • The culture information about the assembly, if this information is provided
  • A public key and private key pair

This information is stored in a key file. The key file is either a Personal Information Exchange (.pfx) file or a certificate from the current user's Microsoft Windows certificate store.

You can sign an assembly by using the options on the Signing tab of the Project Designer in Visual Studio. In Visual Studio, the key file must be stored in the project folder on the local computer. Visual Studio supports only the following file formats:

  • Personal Information Exchange (.pfx) files
  • Strong name key (.snk) files

Requirements

You might meet the following requirements before you install an assembly in the global assembly cache:

  • You must have Administrator rights to the computer where the shared assembly is installed.
  • You must install the .NET Framework SDK.

This article assumes that you're familiar with the following topics:

  • General familiarity with shared assemblies in .NET.
  • General familiarity with the use of tools at a command prompt.

Install an assembly in the global assembly cache

This method is based on how to create an assembly by using Visual Studio. To create an assembly that can be shared by multiple applications, the shared assembly must have a strong name. Additionally, the shared assembly must be deployed in the global assembly cache.

To create a small Visual C# assembly that has a strong name and to install the compiled .dll file in the global assembly cache, follow these steps:

  1. Create a new Visual C# Class Library project that is named GACDemo. To do it, follow these steps:

    1. Start Visual Studio.
    2. On the File menu, select New Project.
    3. In the Templates list, select Class Library.
    4. In the Name box, type GACDemo, and then select OK.
    5. To save the project, press CTRL+SHIFT+S.
    6. In the Location box, type C:DemoProjects.
    7. Clear the Create directory for solution check box, and then select Save.
  2. Generate a strong name, and then associate the strong name key file together with the assembly. To do it, follow these steps:

    1. On the Project menu, select GACDemo Properties.

    2. On the Signing tab, select the Sign the assembly check box.

    3. Under Choose a strong name key file, select <New>.

    4. In the Create Strong Name Key dialog box, select the Protect my key file with a password check box.

    5. In the Key file name box, type GACDemo.

    6. In the Enter password box, type the password that you want to use.

    7. In the Confirm password box, type the same password, and then select OK.

      Note

      We recommend you always use a password when you create a key file. A new key file that is protected by a password is always created in the .pfx file format.

    8. To compile the project, press CTRL+SHIFT+B.

      Note

      No additional code is required to install a .dll file in the global assembly cache.

  3. Install the .dll file that you created in step 2 in the global assembly cache by using the Global Assembly Cache tool. To do it, follow these steps:

    1. Select Start, select Run, type cmd, and then select OK.
    2. Change the current working directory to the directory where the .NET Framework SDK is installed.
    3. At a command prompt, type the gacutil -I 'C:DemoProjectsGACDemobinReleaseGACDemo.dll' command, and then press ENTER.

Verify the assembly is installed in the global assembly cache

You can use the Global Assembly Cache tool to verify the assembly is installed in the global assembly cache. To do it, follow these steps:

Assembler For Windows 10

  1. Select Start, select Run, type cmd, and then select OK.

  2. Change the current working directory to the directory where the .NET Framework SDK is installed.

  3. To display the installation information about the GACDemo assembly, use the Global Assembly Cache tool. To do it, type the gacutil -l GACDemo command at a command prompt, and then press ENTER.

    Note

    The installation information about the GACDemo assembly is displayed.

Turbo Assembler For Windows 10

References