User`s manual

Dynamic C Users Manual digi.com 173
11.2 Assembler and Preprocessor
The assembler parses most C language constant expressions. A C language constant expression is one whose
value is known at compile time. All operators except the following are supported
:
11.2.1 Comments
C-style comments are allowed in embedded assembly code. The assembler will ignore comments begin-
ning with:
; text from the semicolon to the end of line is ignored.
// text from the double forward slashes to the end of line is ignored.
/* text between slash-asterisk and asterisk-slash is ignored */
11.2.2 Defining Constants
Constants may be created and defined in assembly code with the assembly language keyword db (define
byte). db should be followed immediately by numerical values and strings separated by commas. For
example, each of the following lines define the string “ABC”.
db 'A', 'B', 'C'
db "ABC"
db 0x41, 0x42, 0x43
The numerical values and characters in strings are used to initialize sequential byte locations.
If separate I&D space is enabled, assembly constants should either be put in their own assembly block
with the const keyword or be done in C.
#asm const
myrootconstants::
db 0x40, 0x41, 0x42
#endasm
or
const char myrootconstants[] = {‘\x40’, ‘\x41’, ‘\x42’}
Table 11-1. Operators Not Supported By The Assembler
Operator Symbol Operator Description
?:
conditional
.
dot
->
points to
*
dereference