TMS34010 
C 
Language 
-
asm 
Statement/Lexical 
Scope 
Rules 
Warning: 
Be 
extremely 
careful 
not 
to 
disrupt 
the 
C 
environment 
with 
asm 
commands. 
The 
compiler 
does 
not 
check 
the 
inserted 
in-
structions. 
Inserting 
jumps 
and 
labels 
into 
C 
code 
can 
cause 
unpredictable 
results 
in 
variables 
manipulated 
in 
or 
around 
the 
inserted 
code. 
The 
asm 
command 
is 
provided 
so 
you 
can 
access 
features 
of 
the 
hardware, 
which 
by 
definition 
C 
is 
unable 
to 
access. 
Specifically, 
do 
not 
use 
this 
command 
to 
change 
the 
value 
of 
a C 
variable; 
however, 
you 
can 
use 
it 
safely 
to 
read 
the 
current 
value 
of 
a 
variable. 
In 
addition, 
do 
not 
use 
the 
asm 
command 
to 
insert 
assembler 
directives 
which 
would 
change 
the 
assembly 
environment. 
The asm command is very useful in the context 
of 
register variables.  A register 
variable is  a variable in a 
C program that is  declared 
by 
the user 
to 
reside  in  a 
nachine register. 
TMS34010 
C allows 
up 
to 
eight machine  registers 
to 
be 
allocated 
to 
register variables.  These  eight registers,  combined 
with 
the asm 
command, provide a means 
of 
manipulating data  independently 
of 
the C en-
vironment. 
4.9 
Lexical 
Scope 
Rules 
K&R 11.1 
The lexical scope rules  in 
K&R 
also  apply 
to 
TMS3401 0 
C, 
except that struc-
tures and  unions each  have distinct name spaces for their members. 
In  addi-
tion,  the  name  space 
of 
both  enumeration  variables  and  enumeration 
constants 
is 
the same 
as 
for ordinary variables. 
4-11