.ds


Secures the memory area of the number of bytes specified by operand.

[Syntax]

Symbol field
Mnemonic field
Operand field
Comment field
[label:]
.ds
absolute-expression
[; comment]

[Function]

-

The .ds directive tells the assembler to reserve a memory area for the number of bytes specified in the operand field.

[Use]

-

The .ds directive is mainly used to reserve a memory (RAM) area to be used in the program.
If a label is specified, the value of the first address of the reserved memory area is assigned to the label. In the source module, this label is used for description to manipulate the memory.

[Description]

-

If relocation attribute "BSS" is applied to the section where this instruction is written, an area for the number of bytes specified in the operand is allocated. For other sections, an area for the number of bytes specified in the operand is allocated and then initialized by 0.
However, if the number of bytes for the size specification is 0, the area is not allocated.

-

An absolute expression can be described as a size. If the size description is illegal, an error will occur.