Initialization of 2-byte area.
Symbol field |
Mnemonic field |
Operand field |
Comment field |
[label:] |
.db2 |
expression[, ... ] |
[; comment] |
[label:] |
.dhw |
expression[, ... ] |
[; comment] |
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 the .db2 and .dhw directive when defining a 2-byte numeric constant such as an address or data used in the program. |
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. |