Hardware Reference
In-Depth Information
Now place the mouse on the statement min 5 arr[0];
,
press the right mouse button, and
select
Run To Cursor
. We can see that the value of max in the
Data:2
window changes to 50, and the
instruction
STD 2,SP
is highlighted in the Assembly window (shown in Figure 5.23). The value of
max
is correct.
Figure 5.23
■
CodeWarrior debugger screen after program executes until “min
5
arr[0];”
statement
Now press the mouse on the statement
while(1);
and execute the
Run To Cursor
command
again; the debugger window will change to that in Figure 5.24. The values of variables
min, max,
i,
and
ave
are changed to 8, 910, 30, and 459, respectively, and are correct. The variables
min
and
max
receive the minimum and maximum values of the given array as expected whereas the
value of
ave
equals the average of
min
and
max
.
This completes the CodeWarrior debugger tutorial. It is highly recommended that the reader
experiment with other debug commands to become more familiar with the use of the debugger.
The ImageCraft ICC12 is a simple IDE that combines a text editor, a project manager, a C
compiler, and a terminal program. The terminal program allows the ICC12 to work with the
Dragon12-Plus programmed with the D-Bug12 monitor.
Search WWH ::
Custom Search