User manual

Assembler directives ST Assembler-Linker
58/89 Doc ID 11392 Rev 4
Example
DC.B 1,2,3 ; generates 01,02,03
DC.B “HELLO” ; generates 48,45,4C,4C,4F
DC.B “HELLO”,0 ; generates 48,45,4C,4C,4F,00
See also
Table 27. DC.W
Purpose Define word(s) in object code.
Format DC.W<exp>[, <exp>...]
Description
This directive forces the word(s) in its argument list into the object code at the current
address. The arguments may be composed of complex expressions, which may even
include external labels. If the argument was an expression and had a value greater
than FFFF then the lower 16 bits of the expression are used and no errors are
generated. DC.W sends the words with the most significant byte first.
It's generally used for defining data tables. Synonymous with WORD, except that
DC.W places the words in High / Low order.
Example DC.W 1,2,3,4,$1234 ;0001,0002,0003,0004,1234
See also DC.B, BYTE, STRING, WORD, LONG, DC.L
Table 28. DC.L
Purpose Define long word(s) in object code.
Format DC.L <exp>[,<exp>...]
Description
This directive forces the long word(s) argument list into the object code at the current
address. The arguments may be composed of complex expressions, which may even
include external labels. If the argument was an expression and had a value greater
than FFFFFFFF then the 32 bits of the expression are used and no errors are
generated. DC.L sends the words with the most significant byte first.
It's generally used for defining data tables. Synonymous with LONG, except that DC.L
stores the long-words in High / Low order.
Example
DC.L 1,$12345678 ; 0000,0001,1234,5678
LONG 1,$12345678 ; 0100,0000,7856,3421
See also DC.B, DC.W, BYTE, STRING, WORD, LONG
Table 29. #DEFINE
Purpose Define manifest constant.
Format #DEFINE <CONSTANT ID> <real characters>
Table 26. DC.B