.DB


Initialization of byte area.

[Syntax]

Symbol field
Mnemonic field
Operand field
Comment field
[label:]
.DB
expression[, ... ]
[; comment]
[label:]
.DB
"Character string constants"
[; comment]

[Function]

-

The .DB directive tells the assembler to initialize a byte area.

[Description]

-

The .DB directive tells the assembler to initialize byte area..

(a)

Expression

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

An expression that includes a relocatable symbol or external reference name may be described.

(b)

Character string constants

If the first operand is surrounded by corresponding double quotes ("), then it is assumed to be a string constant.

If a character string constant is specified as the operand, a required number of bytes are allocated.

-

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

[Example]

        .DSEG   DATA
LABEL:  .DB     10      ; 1-byte area is initialized by 10
        .DB     "ABC"   ; 3-byte area is initialized by 
                        ; character string "ABC" (0x41, 0x42, 0x43)