EasyManuals Logo

Texas Instruments TMS34010 Reference Guide

Texas Instruments TMS34010
181 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #47 background imageLoading...
Page #47 background image
TMS34010
C
Language
-
Declarations/Initializing
Variables/asm
This statement declares x
as
a variable
of
type enum. The enumerators and
their assigned
values
are:
red:
0
blue:
1
green:
10
orange:
11
purple:
-2
cyan:
-1
32
bits are allocated
for
the variable x. Legal operations on these enumerators
include:
x =
blue;
x
blue
+
red;
x
100;
ired;
/*
assume
i
is
an
int
*/
x i +
cyan;
4.7
Initialization
of
Static
and
Global
Variables
K&R
8.6
An important difference between
K&R
C and
TMS34010
C is
that
external
and
static
variables
are
not
preinitialized
to
zero
unless
the
program
explicitly does so or
it
is
specified
by
the linker.
If
a program requires external and static variables
to
be preinitialized, you can
use the
linker
to
accomplish this. In the linker control file, use a
fill
value
of
o in the .bss section:
SECTIONS (
}
.bss
(
OxOO;
4.8
asm
Statement
A
dditional
Statement
4-10
TMS34010
C supports another statement
that
is
not
mentioned in
K&R:
the
asm
statement.
The compiler copies
asm
statements from the C source
di-
rectly
into
the assembly language
output
file. The syntax
of
the asm statement
is:
asm
("
assembly language statement");
The assembly language statement must be enclosed in
double
quotes.
All
the
usual character string escape codes retain their definitions. The assembler
statement
is
copied directly
to
the assembler source file. Note
that
the as-
sembly language statement
must
begin
with
a label, a blank,
or
a comment
indicator (asterisk
or
semicolon).
Each
asm statement injects one line
of
assembly language
into
the
compiler
output. A series
of
asm
commands places the sequential statements
into
the
output
with
no intervening code.
asm statements
do
not
follow
the syntactic restrictions
of
normal statements
and can appear anywhere in the
C source, even outside blocks.

Table of Contents

Other manuals for Texas Instruments TMS34010

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Texas Instruments TMS34010 and is the answer not in the manual?

Texas Instruments TMS34010 Specifications

General IconGeneral
BrandTexas Instruments
ModelTMS34010
CategoryComputer Hardware
LanguageEnglish

Related product manuals