You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|**/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 [.MODEL](dot-model.md)**TINY** directive.<br /><br /> Not available in ml64.exe.|
29
-
|**/Bl***filename*|Selects an alternate linker.|
30
-
|**/c**|Assembles only. Does no linking.|
31
-
|**/coff**|Generates common object file format (COFF) type of object module. Required for Win32 assembly language development.<br /><br /> Not available in ml64.exe.|
32
-
|**/Cp**|Preserves case of all user identifiers.|
33
-
|**/Cu**|Maps all identifiers to upper case (default).<br /><br /> Not available in ml64.exe.|
34
-
|**/Cx**|Preserves case in public and extern symbols.|
35
-
|**/D***symbol*⟦=*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.|
36
-
|**/EP**|Generates a preprocessed source listing (sent to STDOUT). See **/Sf**.|
37
-
|**/ERRORREPORT**[**NONE**|**PROMPT**|**QUEUE**|**SEND**]| Deprecated. Error reporting is controlled by [Windows Error Reporting (WER)](/windows/win32/wer/windows-error-reporting) settings. |
38
-
|**/F***hexnum*|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*.|
39
-
|**/Fe***filename*|Names the executable file.|
40
-
|**/Fl**⟦*filename*⟧|Generates an assembled code listing. See **/Sf**.|
41
-
|**/Fm**⟦*filename*⟧|Creates a linker map file.|
42
-
|**/Fo***filename*|Names an object file. For more information, see [Remarks](#remarks).|
43
-
|**/FPi**|Generates emulator fix-ups for floating-point arithmetic (mixed language only).<br /><br /> Not available in ml64.exe.|
44
-
|**/Fr**⟦*filename*⟧|Generates a source browser .sbr file.|
45
-
|**/FR**⟦*filename*⟧|Generates an extended form of a source browser .sbr file.|
46
-
|**/Gc**|Specifies use of FORTRAN- or Pascal-style function calling and naming conventions. Same as **OPTION LANGUAGE:PASCAL**.<br /><br /> Not available in ml64.exe.|
47
-
|**/Gd**|Specifies use of C-style function calling and naming conventions. Same as **OPTION LANGUAGE:C**.<br /><br /> Not available in ml64.exe.|
48
-
|**/GZ**|Specifies use of __stdcall function calling and naming conventions. Same as **OPTION LANGUAGE:STCALL**.<br /><br /> Not available in ml64.exe.|
49
-
|**/H***number*|Restricts external names to number significant characters. The default is 31 characters.<br /><br /> Not available in ml64.exe.|
50
-
|**/help**|Calls QuickHelp for help on ML.|
51
-
|**/I***pathname*|Sets path for include file. A maximum of 10 **/I** options is allowed.|
52
-
|**/nologo**|Suppresses messages for successful assembly.|
53
-
|**/omf**|Generates object module file format (OMF) type of object module. **/omf** implies **/c**; ML.exe doesn't support linking OMF objects.<br /><br /> Not available in ml64.exe.|
54
-
|**/Sa**|Turns on listing of all available information.|
55
-
|**/safeseh**|Marks the object as either containing no exception handlers or containing exception handlers that are all declared with [.SAFESEH](dot-safeseh.md).<br /><br /> Not available in ml64.exe.|
56
-
|**/Sf**|Adds first-pass listing to listing file.|
57
-
|**/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](page.md) width.|
58
-
|**/Sn**|Turns off symbol table when producing a listing.|
59
-
|**/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](page.md) length.|
60
-
|**/Ss***text*|Specifies text for source listing. Same as [SUBTITLE](subtitle.md) text.|
61
-
|**/St***text*|Specifies title for source listing. Same as [TITLE](title.md) text.|
62
-
|**/Sx**|Turns on false conditionals in listing.|
63
-
|**/Ta***filename*|Assembles source file whose name doesn't end with the .asm extension.|
64
-
|**/w**|Same as **/W0/WX**.|
65
-
|**/W***level*|Sets the warning level, where *level* = 0, 1, 2, or 3.|
66
-
|**/WX**|Returns an error code if warnings are generated.|
67
-
|**/X**|Ignore INCLUDE environment path.|
68
-
|**/Zd**|Generates line-number information in object file.|
69
-
|**/Zf**|Makes all symbols public.|
70
-
|**/Zi**|Generates CodeView information in object file.|
71
-
|**/Zm**|Enables**M510** option for maximum compatibility with MASM 5.1.<br /><br /> Not available in ml64.exe.|
72
-
|**/Zp**⟦*alignment*⟧|Packs structures on the specified byte boundary. The *alignment* can be 1, 2, or 4.|
73
-
|**/Zs**|Performs a syntax check only.|
74
-
|**/?**|Displays a summary of ML command-line syntax.|
75
-
76
-
*filename*\
23
+
*`options`*\
24
+
The options listed in the following table:
25
+
26
+
| Option | Action |
27
+
|--|--|
28
+
|**`/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 [`.MODEL`](dot-model.md)**`TINY`** directive.<br /> Not available in ml64.exe. |
29
+
|**`/Bl`***`filename`*| Selects an alternate linker in *`filename`*. |
30
+
|**`/c`**| Assembles only. Does no linking. |
31
+
|**`/coff`**| Generates common object file format (COFF) type of object module. Required for Win32 assembly language development.<br /> Not available in ml64.exe. |
32
+
|**`/Cp`**| Preserves case of all user identifiers. |
33
+
|**`/Cu`**| Maps all identifiers to upper case (default).<br /> Not available in ml64.exe. |
34
+
|**`/Cx`**| Preserves case in public and extern symbols. |
35
+
|**`/D`***`symbol`*⟦=*`value`*⟧ | Defines a text macro with the given name *`symbol`*. If *`value`* is missing, it's blank. Multiple tokens separated by spaces must be enclosed in quotation marks. |
36
+
|**`/EP`**| Generates a preprocessed source listing (sent to `STDOUT`). See **`/Sf`**. |
37
+
|**`/ERRORREPORT`**[**`NONE`**|**`PROMPT`**|**`QUEUE`**|**`SEND`**]| Deprecated. Error reporting is controlled by [Windows Error Reporting (WER)](/windows/win32/wer/windows-error-reporting) settings. |
38
+
|**`/F`***`hexnum`*| 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`*. |
39
+
|**`/Fe`***`filename`*| Names the executable file. |
40
+
|**`/Fl`**⟦*`filename`*⟧ | Generates an assembled code listing. See **/Sf**. |
41
+
|**`/Fm`**⟦*`filename`*⟧ | Creates a linker map file. |
42
+
|**`/Fo`***`filename`*| Names an object file. For more information, see [Remarks](#remarks). |
43
+
|**`/FPi`**| Generates emulator fix-ups for floating-point arithmetic (mixed language only).<br /> Not available in ml64.exe. |
44
+
|**`/Fr`**⟦*`filename`*⟧ | Generates a source browser *`.sbr`* file. |
45
+
|**`/FR`**⟦*`filename`*⟧ | Generates an extended form of a source browser *`.sbr`* file. |
46
+
|**`/Gc`**| Specifies use of FORTRAN- or Pascal-style conventions for function calls and names. Same as **`OPTION LANGUAGE:PASCAL`**.<br /> Not available in ml64.exe. |
47
+
|**`/Gd`**| Specifies use of C-style conventions for function calls and names. Same as **`OPTION LANGUAGE:C`**.<br /> Not available in ml64.exe. |
48
+
|**`/GZ`**| Specifies use of `__stdcall` conventions for function calls and names. Same as **`OPTION LANGUAGE:STDCALL`**.<br /> Not available in ml64.exe. |
49
+
|**`/H`***`number`*| Restricts external names to *`number`* significant characters. The default is 31 characters.<br /> Not available in ml64.exe. |
50
+
|**`/help`**| Displays a summary of ML command-line syntax and options. |
51
+
|**`/I`***`pathname`*| Sets path for include file. A maximum of 10 **`/I`** options is allowed. |
52
+
|**`/nologo`**| Suppresses messages for successful assembly. |
53
+
|**`/omf`**| Generates object module file format (OMF) type of object module. **`/omf`** implies **`/c`**. ML.exe doesn't support linking OMF objects.<br /> Not available in ml64.exe. |
54
+
|**`/Sa`**| Turns on listing of all available information. |
55
+
|**`/safeseh`**| Marks the object file: either it contains no exception handlers, or it contains exception handlers that are all declared with [`.SAFESEH`](dot-safeseh.md).<br /> Not available in ml64.exe. |
56
+
|**`/Sf`**| Adds the first-pass listing to the listing file. |
57
+
|**`/Sl`***`width`*| Sets the line width of source listing in characters per line to *`width`*. Range is 60-255 or 0. Default is 0. Same as [`PAGE`](page.md)*`width`*. |
58
+
|**`/Sn`**| Turns off symbol table when a listing is produced. |
59
+
|**`/Sp`***`length`*| Sets the page length of source listing in lines per page to *`length`*. Range is 10-255 or 0. Default is 0. Same as [`PAGE`](page.md)*`length`*. |
60
+
|**`/Ss`***`text`*| Specifies text for source listing. Same as [`SUBTITLE`](subtitle.md) text. |
61
+
|**`/St`***`text`*| Specifies title for source listing. Same as [`TITLE`](title.md) text. |
62
+
|**`/Sx`**| Turns on false conditionals in listing. |
63
+
|**`/Ta`***`filename`*| Assembles source file whose name doesn't end with the *`.asm`* extension. |
64
+
|**`/w`**| Same as **`/W0 /WX`**. |
65
+
|**`/W`***`level`*| Sets the warning level, where *`level`* = 0, 1, 2, or 3. |
66
+
|**`/WX`**| If warnings are generated, returns an error code. |
67
+
|**`/X`**| Ignore `INCLUDE` environment path. |
68
+
|**`/Zd`**| Generates line-number information in object file. |
69
+
|**`/Zf`**| Makes all symbols public. |
70
+
|**`/ZH:MD5`**| Use MD5 for checksum in debug info. |
71
+
|**`/ZH:SHA_256`**| Use SHA256 for checksum in debug info (default in Visual Studio 2022 version 17.0 and later). |
72
+
|**`/Zi`**| Generates CodeView information in object file. |
73
+
|**`/Zm`**| Enables **`M510`** option for maximum compatibility with MASM 5.1.<br /> Not available in ml64.exe. |
74
+
|**`/Zp`**⟦*`alignment`*⟧ | Packs structures on the specified byte boundary. The *`alignment`* can be 1, 2, or 4. |
75
+
|**`/Zs`**| Performs a syntax check only. |
76
+
|**`/?`**| Displays a summary of ML command-line syntax and options. |
77
+
78
+
*`filename`*\
77
79
The name of the file.
78
80
79
-
*link_options*\
81
+
*`link_options`*\
80
82
The link options. For more information, see [Linker options](../../build/reference/linker-options.md).
81
83
82
84
## Remarks
83
85
84
-
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:
86
+
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:
85
87
86
88
```cmd
87
89
ml.exe /Fo a1.obj /c a.asm /Fo b1.obj /c b.asm
88
90
```
89
91
90
92
## Environment Variables
91
93
92
-
|Variable|Description|
93
-
|--------------|-----------------|
94
-
|INCLUDE|Specifies search path for include files.|
95
-
|ML|Specifies default command-line options.|
96
-
|TMP|Specifies path for temporary files.|
94
+
|Variable|Description|
95
+
|--|--|
96
+
|`INCLUDE`|Specifies search path for include files.|
The code page identifier, preceded by a `.` character.
26
24
27
25
## Remarks
28
26
29
-
You can use the **/execution-charset** option to specify an execution character set. The execution character set is the encoding used for the text of your program that is input to the compilation phase after all preprocessing steps. This character set is used for the internal representation of any string or character literals in the compiled code. Set this option to specify the extended execution character set to use when your source files include characters that are not representable in the basic execution character set. You can use either the IANA or ISO character set name, or a dot (.) followed by a 3 to 5 digit decimal code page identifier to specify the character set to use. For a list of supported code page identifiers and character set names, see [Code Page Identifiers](/windows/win32/Intl/code-page-identifiers).
27
+
You can use the **`/execution-charset`** option to specify an execution character set. The execution character set is the encoding used for the text of your program that is input to the compilation phase after all preprocessing steps. This character set is used for the internal representation of any string or character literals in the compiled code. Set this option to specify the extended execution character set to use when your source files include characters that are not representable in the basic execution character set. You can use either the IANA or ISO character set name, or a dot (`.`) followed by 3-5 decimal digits that specify the code page identifier of the character set to use. For a list of supported code page identifiers and character set names, see [Code Page Identifiers](/windows/win32/Intl/code-page-identifiers).
30
28
31
-
By default, Visual Studio detects a byte-order mark to determine if the source file is in an encoded Unicode format, for example, UTF-16 or UTF-8. If no byte-order mark is found, it assumes the source file is encoded using the current user code page, unless you have specified a character set name or code page by using the **/source-charset**option or the **/utf-8** option. Visual Studio allows you to save your C++ source code by using any of several character encodings. For information about source and execution character sets, see [Character Sets](../../cpp/character-sets.md) in the language documentation.
29
+
By default, Visual Studio detects a byte-order mark to determine if the source file is in an encoded Unicode format, for example, UTF-16 or UTF-8. If no byte-order mark is found, it assumes that the source file is encoded in the current user code page, unless you used the **`/source-charset`** or **`/utf-8`** option to specify a character set name or code page. Visual Studio allows you to save your C++ source code in any of several character encodings. For information about source and execution character sets, see [Character sets](../../cpp/character-sets.md) in the language documentation.
32
30
33
-
If you want to set both the source character set and the execution character set to UTF-8, you can use the **/utf-8** compiler option as a shortcut. It is equivalent to specifying **/source-charset:utf-8 /execution-charset:utf-8** on the command line. Any of these options also enables the **/validate-charset** option by default.
31
+
If you want to set both the source character set and the execution character set to UTF-8, you can use the **`/utf-8*`** compiler option as a shortcut. It's equivalent to **`/source-charset:utf-8 /execution-charset:utf-8`** on the command line. Any of these options also enables the **`/validate-charset`** option by default.
34
32
35
33
### To set this compiler option in the Visual Studio development environment
36
34
37
-
1. Open the project **Property Pages** dialog box. For more information, see [Set C++ compiler and build properties in Visual Studio](../working-with-project-properties.md).
35
+
1. Open the **Property Pages** dialog box for your project. For more information, see [Set C++ compiler and build properties in Visual Studio](../working-with-project-properties.md).
0 commit comments