Skip to content

Commit 8d0e16e

Browse files
authored
Merge pull request #4072 from MicrosoftDocs/main
2/1 AM Publishing
2 parents 70e2f67 + da4e2d7 commit 8d0e16e

29 files changed

+570
-574
lines changed
Lines changed: 68 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: "ML and ML64 command-line reference"
33
description: "Reference guide to the Microsoft MASM ML and ML64 assembler command-line options."
4-
ms.date: "02/09/2020"
4+
ms.date: 02/01/2022
55
f1_keywords: ["ML"]
66
helpviewer_keywords: ["/W* MASM compiler option", "/c MASM compiler option", "/EP MASM compiler option", "/Fe MASM compiler option", "/Zp MASM compiler option", "/AT MASM compiler option", "/Zm MASM compiler option", "/Sf MASM compiler option", "/Sp MASM compiler option", "/w MASM compiler option", "/Fl MASM compiler option", "/coff MASM compiler option", "/St MASM compiler option", "/Cx MASM compiler option", "/Sl MASM compiler option", "/Cu MASM compiler option", "MASM (Microsoft Macro Assembler), ML command-line reference", "/FPi MASM compiler option", "/Zf MASM compiler option", "ML environment variable", "/Fr MASM compiler option", "/help MASM compiler option", "/Sa MASM compiler option", "/Zd MASM compiler option", "/I MASM compiler option", "/? MASM compiler option", "/Bl MASM compiler option", "/Fm MASM compiler option", "/Fo MASM compiler option", "command-line reference [ML]", "/Sn MASM compiler option", "/Gd MASM compiler option", "/D* MASM compiler option", "environment variables, ML", "/Gc MASM compiler option", "/F* MASM compiler option", "/Sc MASM compiler option", "/H MASM compiler option", "/Zs MASM compiler option", "/omf MASM compiler option", "/Sg MASM compiler option", "/Cp MASM compiler option", "/Zi MASM compiler option", "/nologo MASM compiler option", "/Sx MASM compiler option", "/WX MASM compiler option", "/Ss MASM compiler option", "command line, reference [ML]", "/Ta MASM compiler option"]
77
ms.assetid: 712623c6-f77e-47ea-a945-089e57c50b40
@@ -14,88 +14,90 @@ For more information on ml64.exe, see [MASM for x64 (ml64.exe)](masm-for-x64-ml6
1414

1515
## Syntax
1616

17-
> ML \[*options*] *filename* \[ \[*options*] *filename*]
17+
> **`ML`** \[*`options`*] *`filename`* \[ \[*`options`*] *`filename`*]
1818
>
19-
> ML64 \[*options*] *filename* \[ \[*options*] *filename*] ... \[/link *link_options*]
19+
> **`ML64`** \[*`options`*] *`filename`* \[ \[*`options`*] *`filename`*] ... \[**`/link`** *`link_options`*]
2020
2121
### Parameters
2222

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 /><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** &#124; **PROMPT** &#124; **QUEUE** &#124; **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`** &#124; **`PROMPT`** &#124; **`QUEUE`** &#124; **`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`*\
7779
The name of the file.
7880

79-
*link_options*\
81+
*`link_options`*\
8082
The link options. For more information, see [Linker options](../../build/reference/linker-options.md).
8183

8284
## Remarks
8385

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:
8587

8688
```cmd
8789
ml.exe /Fo a1.obj /c a.asm /Fo b1.obj /c b.asm
8890
```
8991

9092
## Environment Variables
9193

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. |
97+
| `ML` | Specifies default command-line options. |
98+
| `TMP` | Specifies path for temporary files. |
9799

98100
## See also
99101

100-
[ML Error Messages](ml-error-messages.md)\
101-
[Microsoft Macro Assembler Reference](microsoft-macro-assembler-reference.md)
102+
[ML error messages](ml-error-messages.md)\
103+
[Microsoft Macro Assembler reference](microsoft-macro-assembler-reference.md)
Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,49 @@
11
---
2-
description: "Learn more about: /execution-charset (Set Execution Character Set)"
3-
title: "/execution-charset (Set Execution Character Set)"
4-
ms.date: "02/06/2019"
2+
description: "Learn more about: /execution-charset (Set execution character set)"
3+
title: "/execution-charset (Set execution character set)"
4+
ms.date: 01/31/2022
55
f1_keywords: ["execution-charset", "/execution-charset"]
66
helpviewer_keywords: ["/execution-charset compiler option", "-execution-charset compiler option"]
77
ms.assetid: 0e02f487-2236-45bc-95f3-5760933a8f96
88
---
9-
# /execution-charset (Set Execution Character Set)
9+
# `/execution-charset` (Set execution character set)
1010

11-
Lets you specify the execution character set for your executable.
11+
This option lets you specify the execution character set for your executable.
1212

1313
## Syntax
1414

15-
```
16-
/execution-charset:[IANA_name|.CPID]
17-
```
15+
> **`/execution-charset:`**[*`IANA_name`* | *`.CPID`*]
1816
1917
## Arguments
2018

21-
*IANA_name*<br/>
19+
*`IANA_name`*\
2220
The IANA-defined character set name.
2321

24-
*CPID*<br/>
25-
The code page identifier.
22+
*`.CPID`*\
23+
The code page identifier, preceded by a `.` character.
2624

2725
## Remarks
2826

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

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

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

3533
### To set this compiler option in the Visual Studio development environment
3634

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

3937
1. Select the **Configuration Properties** > **C/C++** > **Command Line** property page.
4038

41-
1. In **Additional Options**, add the **/execution-charset** option, and specify your preferred encoding.
39+
1. In **Additional Options**, add the **`/execution-charset`** option, and specify your preferred encoding.
4240

4341
1. Choose **OK** to save your changes.
4442

4543
## See also
4644

47-
[MSVC Compiler Options](compiler-options.md)<br/>
48-
[MSVC Compiler Command-Line Syntax](compiler-command-line-syntax.md)<br/>
49-
[/source-charset (Set Source Character Set)](source-charset-set-source-character-set.md)<br/>
50-
[/utf-8 (Set Source and Executable character sets to UTF-8)](utf-8-set-source-and-executable-character-sets-to-utf-8.md)<br/>
51-
[/validate-charset (Validate for compatible characters)](validate-charset-validate-for-compatible-characters.md)
45+
[MSVC compiler options](compiler-options.md)\
46+
[MSVC compiler command-line syntax](compiler-command-line-syntax.md)\
47+
[`/source-charset` (Set source character set)](source-charset-set-source-character-set.md)\
48+
[`/utf-8` (Set source and execution character sets to UTF-8)](utf-8-set-source-and-executable-character-sets-to-utf-8.md)\
49+
[`/validate-charset` (Validate for compatible characters)](validate-charset-validate-for-compatible-characters.md)

0 commit comments

Comments
 (0)