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
For the most part, the Microsoft ARM assembler uses the ARM assembly language, which is documented in the [ARM Compiler armasm Reference Guide](http://infocenter.arm.com/help/topic/com.arm.doc.dui0802b/index.html). However, the Microsoft implementations of some assembly directives differ from the ARM assembly directives. This article explains the differences.
9
+
Generally, the Microsoft ARM assembler uses the ARM assembly language, which is documented in the [ARM Compiler armasm Reference Guide](https://developer.arm.com/documentation/dui0802/latest/). However, the Microsoft implementations of some assembly directives differ from the ARM assembly directives. This article explains the differences.
10
10
11
11
## Microsoft Implementations of ARM Assembly Directives
12
12
13
-
- AREA
13
+
-`AREA`
14
14
15
15
The Microsoft ARM assembler supports these `AREA` attributes: `ALIGN`, `CODE`, `CODEALIGN`, `DATA`, `NOINIT`, `READONLY`, `READWRITE`, `THUMB`, `ARM`.
16
16
17
-
All except `THUMB` and `ARM` work as documented in the [ARM Compiler armasm Reference Guide](http://infocenter.arm.com/help/topic/com.arm.doc.dui0802b/index.html).
17
+
All except `THUMB` and `ARM` work as documented in the [ARM Compiler armasm Reference Guide](https://developer.arm.com/documentation/dui0802/latest/).
18
18
19
19
In the Microsoft ARM assembler, `THUMB` indicates that a `CODE` section contains Thumb code, and is the default for `CODE` sections. `ARM` indicates that the section contains ARM code.
20
20
21
-
- ATTR
21
+
-`ATTR`
22
22
23
23
Not supported.
24
24
25
-
- CODE16
25
+
-`CODE16`
26
26
27
-
Not supported because it implies pre-UAL Thumb syntax, which the Microsoft ARM assembler does not allow. Use the `THUMB` directive instead, along with UAL syntax.
27
+
Not supported because it implies pre-UAL Thumb syntax, which the Microsoft ARM assembler doesn't allow. Use the `THUMB` directive instead, along with UAL syntax.
28
28
29
-
- COMMON
29
+
-`COMMON`
30
30
31
-
Specification of an alignment for the common region is not supported.
31
+
Specification of an alignment for the common region isn't supported.
32
32
33
-
- DCDO
33
+
-`DCDO`
34
34
35
35
Not supported.
36
36
37
37
-`DN`, `QN`, `SN`
38
38
39
-
Specification of a type or a lane on the register alias is not supported.
39
+
Specification of a type or a lane on the register alias isn't supported.
40
40
41
-
- ENTRY
41
+
-`ENTRY`
42
42
43
43
Not supported.
44
44
45
-
- EQU
45
+
-`EQU`
46
46
47
-
Specification of a type for the defined symbol is not supported.
47
+
Specification of a type for the defined symbol isn't supported.
*sym* is the symbol to be exported. [*type*], if specified, can be either `[DATA]` to indicate that the symbol points to data or `[FUNC]` to indicate that the symbol points to code. `GLOBAL` is a synonym for `EXPORT`.
55
+
*`symbol`* is the symbol to be exported. *`[type]`*, if specified, can be either `[DATA]` to indicate that the symbol points to data or `[FUNC]` to indicate that the symbol points to code. `GLOBAL` is a synonym for `EXPORT`.
56
56
57
-
- EXPORTAS
57
+
-`EXPORTAS`
58
58
59
59
Not supported.
60
60
61
-
- FRAME
61
+
-`FRAME`
62
62
63
63
Not supported.
64
64
65
65
-`FUNCTION` and `PROC`
66
66
67
-
Although the assembly syntax supports the specification of a custom calling convention on procedures by listing the registers that are caller-save and those that are callee-save, the Microsoft ARM assembler accepts the syntax but ignores the register lists. The debug information that is produced by the assembler supports only the default calling convention.
67
+
The assembly syntax lets you specify a custom calling convention on procedures: you list the registers that are caller-save, and the ones that are callee-save. However, while the Microsoft ARM assembler accepts the syntax, it ignores the register lists. The debug information that's produced by the assembler supports only the default calling convention.
*`symbol`* is the name of the symbol to be imported.
76
76
77
-
If `WEAK`*alias* is specified, it indicates that *sym* is a weak external. If no definition for it is found at link time, then all references to it bind instead to *alias*.
77
+
If `WEAK`*`alias`* is specified, it indicates that *`symbol`* is a weak external. If a definition for it isn't found at link time, then all references to it bind instead to *`alias`*.
78
78
79
-
If `TYPE`*t* is specified, then *t* indicates how the linker should attempt to resolve *sym*. These values for *t* are possible:
79
+
If `TYPE`*`t`* is specified, then *`t`* indicates how the linker should attempt to resolve *`symbol`*. These values for *`t`* are possible:
80
80
81
-
|Value|Description|
82
-
|-|-|
83
-
|1|Do not perform a library search for *sym*|
84
-
|2|Perform a library search for *sym*|
85
-
|3|*sym* is an alias for *alias* (default)|
81
+
|Value|Description|
82
+
|--|--|
83
+
| 1 | Don't search libraries for *`symbol`*. |
84
+
| 2 | Search libraries for *`symbol`*. |
85
+
| 3 |*`symbol`* is an alias for *`alias`* (default). |
86
86
87
-
`EXTERN` is a synonym for `IMPORT`, except that *sym* is imported only if there are references to it in the current assembly.
87
+
`EXTERN` is a synonym for `IMPORT`, except that *`symbol`* is imported only if there are references to it in the current assembly.
88
88
89
-
- MACRO
89
+
-`MACRO`
90
90
91
-
The use of a variable to hold the condition code of a macro is not supported. Default values for macro parameters are not supported.
91
+
The use of a variable to hold the condition code of a macro isn't supported. Default values for macro parameters aren't supported.
92
92
93
-
- NOFP
93
+
-`NOFP`
94
94
95
95
Not supported.
96
96
97
97
-`OPT`, `TTL`, `SUBT`
98
98
99
-
Not supported because the Microsoft ARM assembler does not produce listings.
99
+
Not supported, because the Microsoft ARM assembler doesn't produce listings.
100
100
101
-
- PRESERVE8
101
+
-`PRESERVE8`
102
102
103
103
Not supported.
104
104
105
-
- RELOC
105
+
-`RELOC`
106
106
107
-
`RELOC n` can only follow an instruction or a data definition directive. There is no "anonymous symbol" that can be relocated.
107
+
`RELOC n` can only follow an instruction or a data definition directive. There's no "anonymous symbol" that can be relocated.
108
108
109
-
- REQUIRE
109
+
-`REQUIRE`
110
110
111
111
Not supported.
112
112
113
-
- REQUIRE8
113
+
-`REQUIRE8`
114
114
115
115
Not supported.
116
116
117
-
- THUMBX
117
+
-`THUMBX`
118
118
119
-
Not supported because the Microsoft ARM assembler does not support the Thumb-2EE instruction set.
119
+
Not supported, because the Microsoft ARM assembler doesn't support the Thumb-2EE instruction set.
|[ARM Assembler Diagnostic Messages](../../assembler/arm/arm-assembler-diagnostic-messages.md)|Describes commonly seen armasm warning and error messages.|
17
17
|[ARM Assembler Directives](../../assembler/arm/arm-assembler-directives.md)|Describes the ARM directives that are different in armasm.|
18
18
|[ARM Architecture Reference Manual](https://developer.arm.com/search#q=ARM%20Architecture%20Reference%20Manual) on the ARM Developer website.|Choose the relevant manual for your ARM architecture. Each contains reference sections about ARM, Thumb, NEON, and VFP, and additional information about the ARM assembly language.|
19
-
|[ARM Compiler armasm User Guide](https://developer.arm.com/search#q=ARM%20Compiler%20armasm%20User%20Guide) on the ARM Developer website.|Choose a recent version to find up-to-date information about the ARM assembly language. **Note:** The "armasm" assembler that is referred to on the ARM Developer website is not the Microsoft armasm assembler that is included in Visual Studio and is documented in this section.|
19
+
|[ARM Compiler armasm User Guide](https://developer.arm.com/search#q=ARM%20Compiler%20armasm%20User%20Guide) on the ARM Developer website.|Choose a recent version to find up-to-date information about the ARM assembly language.|
20
+
21
+
> [!IMPORTANT]
22
+
> The armasm assembler that the ARM Developer website describes isn't the same as the Microsoft armasm assembler that's included in Visual Studio and is documented in this section.
0 commit comments