5. Processing Assembly Source Code¶
The c29clang compiler tools installation includes a GNU-syntax C29x assembler that is integrated into the c29clang compiler tool. The c29clang command can be used to assemble a source file containing GNU-syntax C29x assembly language.
Note
Hand-coded Assembly Not Recommended: Hand-coding assembly is strongly discouraged for the TI C29x. Documentation of assembler command line options, assembly syntax, and assembly directives is provided here primarily for examining or debugging disassembled code. Small amounts of assembly language may be embedded in C/C++ source files via asm() statements, which are processed inline by the c29clang integrated GNU-syntax assembler.
5.1. Invoking the Integrated GNU-Syntax C29x Assembler¶
The command is c29clang to invoke the integrated GNU-syntax C29x assembler when presented with a GNU-syntax C29x assembly source input file.
options may be a set of command-line options to influence the behavior of the c29clang compiler and integrated assembler. These are described in the Compiler Options section.
.S files are GNU-syntax assembly source files that are run through the C preprocessor before presenting the output of the preprocessor to the GNU-syntax C29x assembler. Preprocessing directives in the assembly source file are useful for configuring assembly source content based on predefined macro symbols that are available to the C preprocessor.
.s files are GNU-syntax assembly source files that are passed directly to the GNU-syntax C29x assembler for processing.
Files with other file extensions are processed by the c29clang compiler as usual for C source files.
Additional documentation for the GNU-syntax assembler is provided in this documentation and elsewhere:
For an overview of GNU C29x assembly syntax, see GNU-Syntax Assembly Source Anatomy.
For documentation of the assembly directives supported with c29clang, see GNU-Syntax C29 Assembly Directives.
Other documentation of GNU-syntax C29x assembly language is available in GNU and C29x documentation online. The majority of the documented syntax is recognized and processed by the c29clang integrated GNU-syntax C29x assembler. See the following: