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
description: "Reference guide to the Microsoft ARM assembler command-line options."
4
+
ms.date: "02/09/2020"
4
5
ms.assetid: f7b89478-1ab5-4995-8cde-a805f0462c45
5
6
---
6
-
# ARM Assembler Command-Line Reference
7
+
# ARM Assembler command-line reference
7
8
8
-
This article provides command-line information about the Microsoft ARM assembler, *armasm*, which compiles ARMv7 Thumb assembly language into the Microsoft implementation of the Common Object File Format (COFF). The linker can link COFF code with object code that is produced by the ARM assembler or by the C compiler, together with object libraries that are created by the librarian.
9
+
This article provides command-line information about the Microsoft ARM assembler, **armasm**. **armasm** assembles ARMv7 Thumb assembly language into the Microsoft implementation of the Common Object File Format (COFF). The linker can link COFF code objects produced by both the ARM assembler and the C compiler. It can link either together with object libraries created by the librarian.
For more information, see the [ARM Compiler armasm Reference Guide](http://infocenter.arm.com/help/topic/com.arm.doc.dui0802b/index.html).
30
31
31
-
-**-nowarn**<br/>
32
+
-**`-nowarn`**\
32
33
Disable all warning messages.
33
34
34
-
-**-ignore***warning*<br/>
35
+
-**`-ignore`***warning*\
35
36
Disable the specified warning. For possible values, see the section about warnings.
36
37
37
-
-**-help**<br/>
38
+
-**`-help`**\
38
39
Print the command-line help message.
39
40
40
-
-**-machine***machine*<br/>
41
-
Specify the machine type to set in the PE header. Possible values for *machine* are:<br/>
42
-
**ARM**—Sets the machine type to IMAGE_FILE_MACHINE_ARMNT. This is the default.<br/>
41
+
-**`-machine`***machine*\
42
+
Specify the machine type to set in the PE header. Possible values for *machine* are:\
43
+
**ARM**—Sets the machine type to IMAGE_FILE_MACHINE_ARMNT. This option is the default.\
43
44
**THUMB**—Sets the machine type to IMAGE_FILE_MACHINE_THUMB.
44
45
45
-
-**-oldit**<br/>
46
+
-**`-oldit`**\
46
47
Generate ARMv7-style IT blocks. By default, ARMv8-compatible IT blocks are generated.
47
48
48
-
-**-via***filename*<br/>
49
+
-**`-via`***filename*\
49
50
Read additional command-line arguments from *filename*.
50
51
51
-
-**-16**<br/>
52
-
Assemble source as 16-bit Thumb instructions. This is the default.
52
+
-**`-16`**\
53
+
Assemble source as 16-bit Thumb instructions. This option is the default.
53
54
54
-
-**-32**<br/>
55
+
-**`-32`**\
55
56
Assemble source as 32-bit ARM instructions.
56
57
57
-
-**-g**<br/>
58
+
-**`-g`**\
58
59
Generate debugging information.
59
60
60
-
-**-errorReport:***option*<br/>
61
-
Specify how internal assembler errors are reported to Microsoft. Possible values for *option* are:<br/>
62
-
**none**—Do not send reports.<br/>
63
-
**prompt**—Prompt the user to send reports immediately.<br/>
64
-
**queue**—Prompt the user to send reports at the next admin logon. This is the default.<br/>
65
-
**send**—Send reports automatically.
61
+
-**`-errorReport:`***option*\
62
+
This option is deprecated. Starting in Windows Vista, error reporting is controlled by [Windows Error Reporting (WER)](/windows/win32/wer/windows-error-reporting) settings.
66
63
67
-
*sourcefile*<br/>
64
+
*source_file*\
68
65
The name of the source file.
69
66
70
-
*objectfile*<br/>
67
+
*object_file*\
71
68
The name of the object (output) file.
72
69
73
70
## Remarks
74
71
75
72
The following example demonstrates how to use armasm in a typical scenario. First, use armasm to build an assembly language source (.asm) file to an object (.obj) file. Then, use the CL command-line C compiler to compile a source (.c) file, and also specify the linker option to link the ARM object file.
@@ -24,21 +25,21 @@ The options listed in the following table.
24
25
25
26
|Option|Action|
26
27
|------------|------------|
27
-
|**/AT**|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](dot-model.md)**TINY** directive.<br /><br /> Not available in ml64.exe.|
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.|
28
29
|**/Bl***filename*|Selects an alternate linker.|
29
-
|**/c**|Assembles only. Does not link.|
30
-
|**/coff**|Generates common object file format (COFF) type of object module. Generally required for Win32 assembly language development.<br /><br /> Not available in ml64.exe.|
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.|
31
32
|**/Cp**|Preserves case of all user identifiers.|
32
33
|**/Cu**|Maps all identifiers to upper case (default).<br /><br /> Not available in ml64.exe.|
33
34
|**/Cx**|Preserves case in public and extern symbols.|
34
-
|**/D***symbol*⟦=*value*⟧|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.|
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.|
35
36
|**/EP**|Generates a preprocessed source listing (sent to STDOUT). See **/Sf**.|
36
-
|**/ERRORREPORT**[**NONE**|**PROMPT**|**QUEUE**|**SEND**]|If ml.exe or ml64.exe fails at runtime, you can use **/ERRORREPORT** to send information to Microsoft about these internal errors.<br /><br /> For more information about **/ERRORREPORT**, see [/errorReport (Report Internal Compiler Errors)](../../build/reference/errorreport-report-internal-compiler-errors.md).|
37
-
|**/F***hexnum*|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*.|
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*.|
38
39
|**/Fe***filename*|Names the executable file.|
39
40
|**/Fl**⟦*filename*⟧|Generates an assembled code listing. See **/Sf**.|
40
41
|**/Fm**⟦*filename*⟧|Creates a linker map file.|
41
-
|**/Fo***filename*|Names an object file. See Remarks section for more information.|
42
+
|**/Fo***filename*|Names an object file. For more information, see [Remarks](#remarks).|
42
43
|**/FPi**|Generates emulator fix-ups for floating-point arithmetic (mixed language only).<br /><br /> Not available in ml64.exe.|
43
44
|**/Fr**⟦*filename*⟧|Generates a source browser .sbr file.|
44
45
|**/FR**⟦*filename*⟧|Generates an extended form of a source browser .sbr file.|
@@ -49,7 +50,7 @@ The options listed in the following table.
49
50
|**/help**|Calls QuickHelp for help on ML.|
50
51
|**/I***pathname*|Sets path for include file. A maximum of 10 **/I** options is allowed.|
51
52
|**/nologo**|Suppresses messages for successful assembly.|
52
-
|**/omf**|Generates object module file format (OMF) type of object module. **/omf** implies **/c**; ML.exe does not support linking OMF objects.<br /><br /> Not available in ml64.exe.|
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.|
53
54
|**/Sa**|Turns on listing of all available information.|
54
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.|
55
56
|**/Sf**|Adds first-pass listing to listing file.|
@@ -59,7 +60,7 @@ The options listed in the following table.
59
60
|**/Ss***text*|Specifies text for source listing. Same as [SUBTITLE](subtitle.md) text.|
60
61
|**/St***text*|Specifies title for source listing. Same as [TITLE](title.md) text.|
61
62
|**/Sx**|Turns on false conditionals in listing.|
62
-
|**/Ta***filename*|Assembles source file whose name does not end with the .asm extension.|
63
+
|**/Ta***filename*|Assembles source file whose name doesn't end with the .asm extension.|
63
64
|**/w**|Same as **/W0/WX**.|
64
65
|**/W***level*|Sets the warning level, where *level* = 0, 1, 2, or 3.|
65
66
|**/WX**|Returns an error code if warnings are generated.|
@@ -75,14 +76,16 @@ The options listed in the following table.
75
76
*filename*\
76
77
The name of the file.
77
78
78
-
*linkoptions*\
79
-
The link options. See [Linker Options](../../build/reference/linker-options.md) for more information.
79
+
*link_options*\
80
+
The link options. For more information, see [Linker options](../../build/reference/linker-options.md).
80
81
81
82
## Remarks
82
83
83
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:
0 commit comments