Data allocation statements allow you to reserve storage for your program data. To initiate a data allocation statement, an Old-Style-Allocation-Directive may be used, but in modes other than M510 it is preferable to use a Scalar-TypeName or UserDefined-TypeName, which the assembler treats as a pseudo-directive. To introduce consistency into the descriptions, all such variations will be referred to as the Allocation-TypeName.
The Allocation-TypeName that you select determines the data-type of the allocated storage. An optional symbolic name may be associated with the storage, and the storage may also be initialized with specific values if so desired.
Syntax
[Name] Allocation-TypeName Initializer [, Initializer ...]
Allocation-TypeName:
DB DW DD DF DQ DT
The various fields of the data allocation statement are described as follows:
Name
If the Allocation-TypeName entry resolves to a Scalar-TypeName or a pointer to some other type, then the Initializer field must be specified using an expression syntax that can be resolved to a Scalar-Initializer-ExpressionType. See the following section on Initialization of Scalar Types for a full description of this topic.
If the Allocation-TypeName entry resolves to a Record-TypeName, Structure-TypeName, or Union-TypeName, then the Initializer field must be specified using the Compound-Initializer syntax. See the following section on Initialization of Aggregate Types for a full description of this topic.
If the Allocation-TypeName entry resolves to an array of any other type, then the Initializer field must be specified using the Compound-Initializer syntax. See the following section on Initialization of Vector Types for a full description of this topic.
Each Initializer entry may also be duplicated by making it the operand of a Duplicative-Expression. When assembling in ALP mode however, the DUP operator is considered obsolete and its use is discouraged. Instead, a Typedef-TypeName associated with the declaration of a true array should be used in the Allocation-TypeName field along with the appropriate compound initializer.