Epson S5U1C63000A User Manual

Page 161

Advertising
background image

CHAPTER 8: DEBUGGER

S5U1C63000A MANUAL

EPSON

147

(S1C63 FAMILY ASSEMBLER PACKAGE)

Single-stepping

(1) Types of single-stepping

There are two types of single-stepping available:

• Stepping through all instructions (STEP)

All instructions are executed one step at a time according to the PC, regardless of the type of
instruction.

• Stepping through instructions except subroutines (NEXT)

The calr, calz and int instructions are executed under the assumption that one step constitutes the
range of statements until control is returned to the next step by a return instruction. Other instruc-
tions are executed in the same way as in ordinary single-stepping.

In either case, the program starts executing from the current PC.

Table 8.8.4.2 Commands/menu items/tool bar buttons for single-stepping

Function

Command

Menu

Button

Stepping through all instructions

s

[Run | Step]

Stepping through all instructions except subroutines

n

[Run | Next]

When executing single-stepping by command input, the number of steps to be executed can be
specified, up to 65,535 steps. When using menu commands or tool bar buttons, the program is ex-
ecuted one step at a time.
In the following cases, single-stepping is terminated before a specified number of steps is executed:
• When the [Key Break] button is clicked or the [Esc] key is pressed.
• When a map break or similar break occurs.

Single-stepping is not suspended by breaks set by the user such as a PC break or data break.

[Key Break] button

When the program does not stop, use this button to forcibly stop it.

(2) Display during single-stepping

In the initial debugger settings, the display is updated as follows:
The display contents of the [Register] window are updated every step. If the [Register] window is
closed, its contents are displayed in the [Command] window. This default display mode can be
switched over by the md command so that the display contents are updated at only the last step in a
specified number of steps.
The display of the [Source] and [Data] windows are updated after the specified number of step
executions are completed.

(3) HALT and SLEEP states and interrupts

The CPU is placed in a standby mode when the halt or slp instruction is executed. An interrupt is
required to cancel this mode.
The debugger has a mode to enable or disable an external interrupt for use in single-step operation.

Table 8.8.4.3 External interrupt modes

External interrupt

halt and slp instructions

Enable mode

Interrupt is processed.

Executed as the halt instruction.

Processing is continued by an

external interrupt or clicking on

the [Key Break] button.

Disable mode

Interrupt is not processed.

The halt and slp instructions are

replaced with a nop instruction as

the instruction is executed.

In the initial settings, the debugger is set to the interrupt disable mode. The interrupt enable mode can
also be set by using the md command.

Advertising