User manual

Assembler directives ST Assembler-Linker
60/89 Doc ID 11392 Rev 4
Description
This directive is used to 'space out' label definitions. For example let's say we need a
set of word-sized temporary storage locations to be defined in RAM, starting at
address $4000. We could write:
segment byte at 4000 'RAM'
temp1 equ $4000
temp2 equ $4002
which would work fine, however, we recommend you to write:
segment byte at 4000 'RAM'
temp1 DS.W
temp2 DS.W
which does the same job. The advantage is that the PC increments automatically.
There are two other types of DS instructions available for doing BYTE and LONG
length storage areas: DS.B and DS.L. Note that the areas in question are not
initialized to any value; it's merely a way of allocating values to labels.
The optional argument specifies how many bytes to allocate; the default is 1.
Because no code is generated to fill the space, you are not allowed to use DS.W in
segments containing code, only for segments with data definitions.
Example labl DS.W
See also DS.B, DS.L
Table 32. DS.L
Purpose Define long space in object code.
Format DS.L [optional number of long words]
Description
This directive is used to 'space out' label definitions. For example let's say we need a
set of long-word-sized temporary storage locations to be defined in RAM, starting at
address $4000. We could write:
segment byte at 4000 'RAM'
temp1 equ $4000
temp2 equ $4004
which would work fine, however, we recommend you to write:
segment byte at 4000 'RAM'
temp1 DS.L
temp2 DS.L
which does the same job. The advantage is that the PC increments automatically.
There are two other types of DS instructions available for doing BYTE and WORD
length storage areas: DS.B and DS.W. Note that the areas in question are not
initialized to any value; it's merely a way of allocating values to labels.
The optional argument specifies how many bytes to allocate; the default is 1.
Because no code is generated to fill the space, you are not allowed to use DS.L in
segments containing code, only for segments with data definitions.
Example labl DS.L
See also DS.B, DS.W
Table 31. DS.W