Panasonic MN1030 User Manual

Page of 340
Chapter  9  Writing Machine Language Instructions and Directive Statements
166  Writing Directive Statements
9.4.10 dc
Syntax
label
operation
operand
[name]
dc
constant | expression  (, constant | expression )...
Functional description
This directive is used to define constants in a memory area.  The 8-bit constant specified by the 
operand will be stored at the location of the statement specifying this directive.
When a name is coded for the label, the assembler will assign the current location counter value to that 
name.
Operand coding rules
The expression coded in the operand must result in the attribute abs(absolute).  
Refer to section 8.7.4 “Expression Attributes”, regafding attributes of expressions.
Specify one of the following constants or the operand.
character constant
string constant
The operands are delimited with commas (,).  Any number of operands can be coded.
If data that exceeds 8 bits is specified, the lower 8 bits will be valid, and the upper bits will be lost.  The 
assembler will output a warning message in such cases.
When the specified data has fewer than 8 bits, those bits will fill the lower bits, and the upper bits will 
be padded with zeroes.
Usage example
Below is an example use of the dc directive.
DC.LST
Page 1
***  PanaX Series MN1030 Cross Assembler  ***
Loc
Object
Line
Source
1
_DATA
section
DATA,PUBLIC,4
00000000
41
2
cd0  dc
’A’
00000001
414243
3
cd1  dc
“ABC”
00000004
3F
4
cd2  dc
255 >> 2
00000005
0E
5
cd3  dc
(12+3)/2*2
00000006
FF
6
cd4  dc
0b11111111
00000007
FFFE
7
cd5  dc
0377, 0376
00000009
FF
8
cd6  dc
255