Interfacing C with Assembly Language
6-24
4 shows an example that accesses a variable that is not defined
in .bss.
Example 6
−
4. Accessing a Variable Not Defined in .bss From C
(a) C program
extern float sine[];
/* This is the object */
f = sine[4];
/* Access sine as normal array*/
(b) Assembly language program
.global
_sine
; Declare variable as external
.sect
”sine_tab”
; Make a separate section
_sine:
; The table starts here
.float 0.0
.float 0.015987
.float 0.022145
6.4.4 Modifying Compiler Output
You can inspect and change the assembly language output produced by the
compiler by compiling the source and then editing the output file before assem-
bling it. The C interlist utility is useful for inspecting compiler output. For
information on the interlist utility, see section 2.7,
Using the Interlist Utility,
on
page 2-34. The warnings in section 6.4.2 about disrupting the C environment
also apply to the modification of compiler output.
Summary of Contents for TMS320C2x
Page 8: ...viii...
Page 69: ...2 47 C Compiler Description...
Page 159: ...6 36...
Page 226: ...8 6...