.db2/.dhw


Initialization of 2-byte area.

[Syntax]

Symbol field

Mnemonic field

Operand field

Comment field

[label:]
.db2 
expression[, ... ]
[; comment]
[label:]
.dhw 
expression[, ... ]
[; comment]

[Function]

-

The .db2 and .dhw directive tells the assembler to initialize a memory area in 2-byte units with the initial value(s) specified in the operand field.

[Use]

-

Use the .db2 and .dhw directive when defining a 2-byte numeric constant such as an address or data used in the program.

[Description]

-

The assembler initializes 2-byte area with:

(a)

Expression

The value of an expression must be 2-byte data. Therefore, the value of the operand must be in the range of 0x0 to 0xFFFF. If the value exceeds 2-byte, the assembler will use only lower 2-byte of the value as valid data.

No character string constants can be described as an initial value.

 

-

If the relocation attribute of the section containing the .db2 and .dhw directive is "BSS", then an error is output because initial values cannot be specified.

-

Two or more initial values may be specified within a statement line of the .db2 and .dhw directive.

-

As an initial value, an expression that includes a relocatable symbol or external reference symbol may be described.