
234
Debugging
Section 7-8
Note
Set the variables using the WATCH command after the program has been
compiled for the RUN command.
7-8-5
Trace Function (TRON and TRACE)
When the TRON command is executed, the executed program lines are dis-
played at the terminal in order of execution. This allows you to see execution
for programming such as for FOR to NEXT repetitions, and IF GOTO and
GOSUB subroutine branching. When using the TRON command with the M
option, trace data is stored in the trace buffer, and can be displayed at the ter-
minal later using the TRACE command.
The trace buffer can store a maximum of 255 lines (when 255 lines are
exceeded, lines are overwritten starting from the first line executed.)
Note
Trace details stored in the trace buffer are backed up by a battery even after
the power supply is turned off. This means that they can be read afterwards
using the TRACE command. The trace buffer is cleared using the NEW or
TROFF command.
TRON
Syntax
TRON[M]
Meaning
TRON starts a trace of the lines that follow. After RUN, the executed lines are
displayed at the terminal enclosed in brackets [ ]. If the option [M] is used, the
trace is output to the trace buffer. A maximum of 255 lines can be traced.
Example
TRON:
Starts a trace of the lines that follow
TRON[M]: Starts a trace of the lines that follow, and stores the trace in the
trace buffer.
Examples of the Trace Function
RUN
[10][20][30][20][40]....:
Lines were executed in the order [10][20][30][20][40].
TRACE
Syntax
TRACE
Meaning
TRACE displays the contents of the trace buffer at the terminal. Executed
lines are displayed sequentially inside square brackets [ ] in the order in which
they were executed.
Examples of the Trace Function
TRON M
TRACE
[10][20][30][20][40].....: Lines were executed in the order [10][20][30][20][40].
Note
Only when the execution line number is changed, the line number is added to
the trace buffer. Therefore, if a line such as 100 GOTO 100 is executed,
TRACE will display [100] one time only.
A DEVICE UNAVAILABLE IN PORT X error will occur if line numbers dis-
played for traces are duplicated when displaying program trace results on the
terminal while executing an interrupt subroutine. If this occurs, use the M
option for the TRON command to store trace results in the trace buffer.
Содержание C200H-ASC11
Страница 1: ...C200H ASC11 ASC21 ASC31 ASCII Units Operation Manual Revised June 2000...
Страница 2: ...iv...
Страница 4: ...vi...