Everything

.db4/.dw


Initialization of 4-byte area.

[Syntax]

Symbol field

Mnemonic field

Operand field

Comment field

[label:]
.db4
expression[, ... ]
[; comment]
[label:]
.dw
expression[, ... ]
[; comment]

[Function]

-

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

[Use]

-

Use the .db4 and .dw directive when defining a 4-byte numeric constant such as an address or data used in the program.

[Description]

-

The assembler initializes 4-byte area with:

(a)

Expression

The value of an expression must be 4-byte data. Therefore, the value of the operand must be in the range of 0x0 to 0xFFFFFFFF. If the value exceeds 4-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.

 

-

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

-

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

-

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