beautypg.com

8 dcb — define constant block, Dcb — define constant block – Motorola HC12 User Manual

Page 172

background image

User’s Manual

MCUez HC12 Assembler

172

Assembler Directives

MOTOROLA

Assembler Directives

8.8 DCB — Define Constant Block

Syntax:

[

DCB

[] ,

where

= B (default), W, or L

Description:

The

DCB

directive causes the assembler to allocate a memory

block initialized with the specified . The length of the
block is * .

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 , which may contain forward references.
The 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