A directive differs from an Instructions because it is a compiler directive rather than runtime instruction.
Data reservation directives allow us to insert constants into our code. This is useful with a label.
op
: operation mnemonicdata
: data to insert into code
Directive | Full Name | Notes |
---|---|---|
DCB |
Define constant byte | |
DCW |
Define constant word | Allocates one or more halfwords, aligned on two-byte boundaries |
DCD |
Define constant data | Allocates one or more words, aligned on four-byte boundaries |
data DCD 0, 0, 0
Initializes 3 words to zeros