DC - Define Constant

Syntax
  [<label>:]  DC [.<size>] <expression> [, 
  <expression>]...
  
  

where <size> = B (default), W, or L.

Synonym
  DCW (= 2 byte DCs),  DCL (= 4 byte DCs),
  
  FCB (= DC.B), FDB    (= 2 byte DCs),
  
  FQB (= 4 byte DCs)
  
Description

The DC directive defines constants in memory. It can have one or more <expression> operands, which are separated by commas. The <expression> can contain an actual value (binary, octal, decimal, hexadecimal, or ASCII). Alternatively, the <expression> can be a symbol or expression that can be evaluated by the Assembler as an absolute or simple relocatable expression. One memory block is allocated and initialized for each expression.

The following rules apply to size specifications for DC directives:

If the value in an operand expression exceeds the size of the operand, the assembler truncates the value and generates a warning message.

See also

Assembler directives: