User’s Manual MCUez HC12 Assembler
172 Assembler Directives MOTOROLA
Assembler Directives
8.8 DCB — Define Constant Block
Syntax: [<label>:] DCB [<size>] <count>, <value>
where
<size> = B (default), W, or L
Description: The DCB directive causes the assembler to allocate a memory
block initialized with the specified <value>. The length of the
block is <size> * <count>.
<count> may not contain undefined, forward, or external
references. It may range from 1 to 4096.
The value of each storage unit allocated is the sign-extended
expression <value>, which may contain forward references.
The <count> cannot be relocatable. This directive does not
perform alignment.
These rules apply to size specifications for DCB directives:
DCB.B — One byte is allocated for numeric expressions.
DCB.W — Two bytes are allocated for numeric
expressions.
DCB.L — Four bytes are allocated for numeric
expressions.
Example:
000000 FFFF FF Label: DCB.B 3, $FF
000003 FFFE FFFE DCB.W 3, $FFFE
000007 FFFE
000009 0000 FFFE DCB.L 3, $FFFE
00000D 0000 FFFE
000011 0000 FFFE