ML and ML64 Command-Line Reference

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).

ML [[options]] filename [[ [[options]]  filename]]
ML64 [[options]] filename [[ [[options]]  filename]]
[[/link linkoptions]]


  • options
    The options listed in the following table.




    Enables tiny-memory-model support. Enables error messages for code constructs that violate the requirements for .com format files. Note that this is not equivalent to the .MODEL TINY directive.

    Not available in ml64.exe.

    /Bl filename

    Selects an alternate linker.


    Assembles only. Does not link.


    Generates common object file format (COFF) type of object module. Generally required for Win32 assembly language development.

    Not available in ml64.exe.


    Preserves case of all user identifiers.


    Maps all identifiers to upper case (default).

    Not available in ml64.exe.


    Preserves case in public and extern symbols.


    Defines a text macro with the given name. If value is missing, it is blank. Multiple tokens separated by spaces must be enclosed in quotation marks.


    Generates a preprocessed source listing (sent to STDOUT). See /Sf.


    If ml.exe or ml64.exe fails at runtime, you can use /ERRORREPORT to send information to Microsoft about these internal errors.

    For more information about /ERRORREPORT, see /errorReport (Report Internal Compiler Errors).


    Sets stack size to hexnum bytes (this is the same as /link/STACK:number). The value must be expressed in hexadecimal notation. There must be a space between /F and hexnum.


    Names the executable file.


    Generates an assembled code listing. See /Sf.


    Creates a linker map file.


    Names an object file. See Remarks section for more information.


    Generates emulator fix-ups for floating-point arithmetic (mixed language only).

    Not available in ml64.exe.


    Generates a source browser .sbr file.


    Generates an extended form of a source browser .sbr file.


    Specifies use of FORTRAN- or Pascal-style function calling and naming conventions. Same as OPTION LANGUAGE:PASCAL.

    Not available in ml64.exe.


    Specifies use of C-style function calling and naming conventions. Same as OPTION LANGUAGE:C.

    Not available in ml64.exe.


    Specifies use of __stdcall function calling and naming conventions. Same as OPTION LANGUAGE:STCALL.

    Not available in ml64.exe.


    Restricts external names to number significant characters. The default is 31 characters.

    Not available in ml64.exe.


    Calls QuickHelp for help on ML.


    Sets path for include file. A maximum of 10 /I options is allowed.


    Suppresses messages for successful assembly.


    Generates object module file format (OMF) type of object module. /omf implies /c; ML.exe does not support linking OMF objects.

    Not available in ml64.exe.


    Turns on listing of all available information.


    Marks the object as either containing no exception handlers or containing exception handlers that are all declared with .SAFESEH.

    Not available in ml64.exe.


    Adds first-pass listing to listing file.

    /Sl width

    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.


    Turns off symbol table when producing a listing.

    /Sp length

    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.

    /Ss text

    Specifies text for source listing. Same as SUBTITLE text.

    /St text

    Specifies title for source listing. Same as TITLE text.


    Turns on false conditionals in listing.

    /Ta filename

    Assembles source file whose name does not end with the .asm extension.


    Same as /W0/WX.


    Sets the warning level, where level = 0, 1, 2, or 3.


    Returns an error code if warnings are generated.


    Ignore INCLUDE environment path.


    Generates line-number information in object file.


    Makes all symbols public.


    Generates CodeView information in object file.


    EnablesM510 option for maximum compatibility with MASM 5.1.

    Not available in ml64.exe.


    Packs structures on the specified byte boundary. The alignment can be 1, 2, or 4.


    Performs a syntax check only.


    Displays a summary of ML command-line syntax.

  • filename
    The name of the file.

  • linkoptions
    The link options. See Linker Options for more information.


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:

ml.exe /Fo a1.obj /c a.asm /Fo b1.obj /c b.asm

Environment Variables




Specifies search path for include files.


Specifies default command-line options.


Specifies path for temporary files.

See Also


ML Error Messages

Other Resources

Microsoft Macro Assembler Reference