Syntax

DC.B initializer [, initializer]…

Description

The DC.B directive defines an object as an initialized array of bytes. If the directive is labeled, the label is assigned the location counter of the current section before the data is placed in that section. If a single initializer is present, the label's data type is set to BYTE; otherwise, it is set to be a fixed array of BYTE, the bounds of which are set by the number of elements defined.

Example

Mask DC.B 0x01, 0x03, 0x07, 0x0f, 0x1f, 0x3f, 0x7f, 0xff

This defines the label Mask and allocates eight bytes with the given values. The type of Mask is set to BYTE[8], an array of eight bytes, because eight values are listed.

You use the DB directive to define string data. When the assembler sees a string, it expands it into a series of bytes and places those into the current section.

Example

BufOvfl DC.B 13, 10, "WARNING: buffer overflow", 0

This emits the bytes 13 and 10 into the current section, followed by the ASCII bytes comprising the string, and finally a trailing zero byte.