Inline Assembly Language Support Keyword (asm)
The
cc219x asm()
guage instructions within a C or C++ function and to pass declarations
and directives through to the assembler. The
expressing assembly language statements that cannot be expressed easily or
efficiently with C constructs.
The
keyword allows you code complete assembly language instruc-
asm()
tions or you can specify the operands of the instruction using C
expressions. When specifying operands with a C expression, you do not
need to know which registers or memory locations contain C variables.
The C compiler does not analyze code defined with the
passes this code directly to the assembler. The compiler does perform sub-
stitutions for operands of the formats
everything else through to the assembler without reading or analyzing it.
The
asm()
not appear before declarations within C/C++ functions.
A simplified
asm()
asm(" ENA INT;");
The complete assembly language instruction, enclosed in quotes, is the
argument to
asm()
The compiler generates a label before and after inline assembly
instructions when generating debug code (
are used to generate the debug line information used by the debug-
ger. If the inline assembler inserts conditionally assembled code, an
undefined symbol error is likely to occur at link time. If the inline
assembler changes the current section and thereby causes the com-
piler labels to be placed in another section, such as a data section
(instead of the default code section), then the debug line informa-
tion will be incorrect for these lines.
VisualDSP++ 3.5 C/C++ Compiler and Library Manual
for ADSP-219x DSPs
construct allows you to code ADSP-219x assembly lan-
constructs are executable statements, and as such, may
construct without operands takes the form of:
.
construct is useful for
asm()
asm()
through
. However, it passes
%0
%9
switch). These labels
-g
Compiler
construct; it
1-63
Need help?
Do you have a question about the VISUALDSP++ 3.5 and is the answer not in the manual?
Questions and answers