To single-step from the middle of a program:

1.Insert a HALT command in the program where you want to begin single-stepping.

2.Execute the program normally. The program stops when the HALT command is executed, and the HLT annunciator appears.

3.Take any action:

To see the next program step displayed in the status area and then executed, press %SST%.

To display but not execute the next one or two program steps, press %NEXT%.

To continue with normal execution, press !=.

To abandon further execution, press %KILL%.

4.Repeat the previous step as desired.

When you want the program to run normally again, remove the HALT command from the program.

To single-step when the next step is a subroutine:

To execute the subroutine in one step (“step over”), press %SST%.

To execute the subroutine step-by-step (“step into”), press %SST°%.

%SST% executes the next step in a program — if the next step is a subroutine, %SST% executes the subroutine in one step. %SST°% works just like %SST% — except if the next program step is a subroutine, it single-steps to the first step in the subroutine.

Example: In the previous example, you used %SST% to execute subroutine TORSA in one step. Now execute program TORSV step by step to calculate the volume of a torus of radii a = 10 and b = 12. when you reach subroutine TORSA, execute it step by step.

Select the VAR menu and enter the data. Enter the program name and start the debugging. Execute the first four steps of the program, then check the next step.

@·J10 `12 O%TORSV% !°LL%RUN% %DBUG%

%SST°%(4 times)

%NEXT%

The next step is TORSA. Single-step into TORSA, then check that you’re at the first step of TORSA.

%SST°% %NEXT%

Press != !=to complete subroutine and program execution. The following table summarizes the operations for single-stepping through a program.

1-32 RPL Programming