Skip to content

Commit 4820d47

Browse files
author
Colin Robertson
authored
Update comm.md
Sometimes you just get carried away when you see how uninformative something is.
1 parent 85aabfb commit 4820d47

File tree

1 file changed

+29
-19
lines changed

1 file changed

+29
-19
lines changed

docs/assembler/masm/comm.md

Lines changed: 29 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: "COMM | Microsoft Docs"
33
ms.custom: ""
4-
ms.date: "11/04/2016"
4+
ms.date: "05/22/2018"
55
ms.technology: ["cpp-masm"]
66
ms.topic: "reference"
77
f1_keywords: ["COMM"]
@@ -13,21 +13,31 @@ ms.author: "corob"
1313
ms.workload: ["cplusplus"]
1414
---
1515
# COMM
16-
Creates a communal variable with the attributes specified in `definition`.
17-
18-
## Syntax
19-
20-
```
21-
22-
COMM definition [[, definition]] ...
23-
```
24-
25-
## Remarks
26-
Each `definition` has the following form:
27-
28-
[[*langtype*]] [[**NEAR** | **FAR**]] *label* **:** `type`[[**:** *count*]]
29-
30-
The *label* is the name of the variable. The `type` can be any type specifier ([BYTE](../../assembler/masm/byte-masm.md), [WORD](../../assembler/masm/word.md), and so on) or an integer specifying the number of bytes. The *count* specifies the number of data objects (one is the default).
31-
32-
## See Also
33-
[Directives Reference](../../assembler/masm/directives-reference.md)
16+
17+
Creates a communal variable with the attributes specified in *definition*.
18+
19+
## Syntax
20+
21+
> **COMM** *definition* [, *definition*] ...
22+
23+
## Remarks
24+
25+
Communal variables are allocated by the linker, and can't be initialized. This means that you can't depend on the location or sequence of such variables.
26+
27+
Each *definition* has the following form:
28+
29+
[*langtype*] [**NEAR** | **FAR**] _label_**:**_type_[**:**_count_]
30+
31+
The optional *langtype* sets the naming conventions for the name that follows. It overrides any language specified by the **.MODEL** directive. The optional **NEAR** or **FAR** override the current memory model. The *label* is the name of the variable. The *type* can be any type specifier ([BYTE](../../assembler/masm/byte-masm.md), [WORD](../../assembler/masm/word.md), and so on) or an integer specifying the number of bytes. The optional *count* specifies the number of elements in the declared data object; the default is one.
32+
33+
## Example
34+
35+
This example creates an array of 512 BYTE elements:
36+
37+
```masm
38+
COMM FAR ByteArray:BYTE:512
39+
```
40+
41+
## See also
42+
43+
[Directives Reference](../../assembler/masm/directives-reference.md)

0 commit comments

Comments
 (0)