
Basic Methods for Changing Data Values
7-5
Managing Data
ESC
4) Type the new information. If you make a mistake or change your mind,
press
ESC
; this resets the field to its original value.
5) When you finish typing the new information, press
or any arrow key.
This replaces the original value with the new value.
Note:
If you press
when the cursor is in the middle of text, the debugger truncates
the input text at the point where you press
. Likewise, if you use
←
or
→
to move to the beginning of the previous or next field, the debugger truncates
the input text at the point where you press the
←
or
→
.
Advanced “editing”—using expressions with side effects
Using the overwrite editing feature to modify data is straightforward. However,
data-management methods take advantage of the fact that C expressions are
accepted as parameters by most debugger commands and that C expressions
can have
side effects. When an expression has a side effect, it means that the
value of some variable in the expression changes as the result of evaluating
the expression.
This means that you can coerce many commands into changing values for
you. Specifically, it’s most helpful to use ? and EVAL to change data as well
as display it.
For example, if you want to see what’s in auxiliary register A3, you can enter:
? A3
You can also use this type of command to modify A3’s contents. Here are some
examples of how you might do this:
? A3++
Side effect: increments the contents of A3 by 1
eval ––A3
Side effect: decrements the contents of A3 by 1
? A3 = 8
Side effect: sets A3 to 8
eval A3/=2
Side effect: divides contents of A3 by 2
Note that not all expressions have side effects. For example, if you enter
? A3+4, the debugger displays the result of adding 4 to the contents of A3 but
does not modify A3’s contents. Expressions that have side effects must con-
tain an assignment operator or an operator that implies an assignment. Opera-
tors that can cause a side effect are:
=
+=
–=
*=
/=
%=
&=
^=
|=
<<=
>>=
++
– –
Содержание TMS320C6 Series
Страница 10: ...x ...
Страница 20: ...xx ...
Страница 118: ...4 20 ...
Страница 144: ...6 16 ...
Страница 164: ...7 20 ...
Страница 170: ...8 6 ...
Страница 284: ...B 18 ...
Страница 290: ...C 6 ...