.DB


Initialization of byte area.

[Syntax]

Symbol field
Mnemonic field
Operand field
Comment field
[label:]
.DB
{expression|"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 of data. Therefore, the value of the operand must be in the range of 0x0 to 0xFF. The assembler checks the lower-order 24 bits of the result of an operation and outputs an error message if the value is not within the range from 0x0 to 0xFF.

An expression may include a relocatable symbol or reference to an external name.

(b)

Character string constants

If an 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)