
C Expressions for Assembly Language Programmers
12-3
Basic Information About C Expressions
-
Increment and decrement operators
++
increment
– –
decrement
These unary operators can precede or follow a symbol. When the operator
precedes a symbol, the symbol value is incremented/decremented before
it is used in the expression; when the operator follows a symbol, the sym-
bol value is incremented/decremented after it is used in the expression.
Because these operators affect the symbol’s final value, they have side
effects.
-
Bitwise operators
&
bitwise AND
|
bitwise OR
^
bitwise exclusive-OR
<<
left shift
>>
right shift
~
1s complement (unary)
-
Assignment operators
=
assignment
+ =
assignment with addition
– =
assignment with subtrac-
tion
/ =
assignment with division
% =
assignment with modulo
& =
assignment with bitwise
AND
^ =
assignment with bitwise
XOR
| =
assignment with bitwise OR
<< =
assignment with left shift
>> =
assignment with right shift
* =
assignment with multiplica-
tion
These operators support a shorthand version of the familiar binary expres-
sions; for example, X = X + Y can be written in C as X += Y. Because these
operators affect a symbol’s final value, they have side effects.
Содержание TMS320C6 Series
Страница 10: ...x ...
Страница 20: ...xx ...
Страница 118: ...4 20 ...
Страница 144: ...6 16 ...
Страница 164: ...7 20 ...
Страница 170: ...8 6 ...
Страница 284: ...B 18 ...
Страница 290: ...C 6 ...