COMM

Creates a communal variable with the attributes specified in definition.

Syntax

COMM definition, definition ...⟧

Remarks

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.

Each definition has the following form:

language-type⟧ ⟦NEAR | FARlabel:type:count

The language-type, NEAR, and FAR arguments are valid only in 32-bit MASM.

The optional language-type 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, WORD, 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 count is one.

Example

This example creates an array of 512 BYTE elements:

COMM FAR ByteArray:BYTE:512

See also

Directives reference
MASM BNF Grammar