beautypg.com

N (next) – Epson S5U1C62000A User Manual

Page 185

background image

S5U1C62000A MANUAL

EPSON

173

(S1C60/62 FAMILY ASSEMBLER PACKAGE)

CHAPTER 9: DEBUGGER

n

(next)

Function

This command single-steps the target program from the current PC position by executing one instruc-
tion at a time.

Format

>n []

(direct input mode)

:

Number of steps to be executed; decimal (default is 1)

Condition: 0

step

65,535

Operation

This command basically operates in the same way as the s command.
However, the call and calz instructions, including all subroutines until control returns to the next
address, are executed as one step. After executing such step, the PC will be set to the second instruc-
tion address after the call or calz instruction. If the next instruction is also call or calz, the PC will be
set to the first instruction address in the subroutine called by the second call or calz instruction.

Example when 1 call instruction is executed by the n command without step count

......

PC when "n" is executed

call _test1
ld a,0

PC after "n" is completed

ld b,0

......

Example when 2 call instructions are executed by the n command without step count

......

PC when "n" is executed

call _test1
call _test2
ld a,0
ld b,0

......

PC after "n" is completed

_test2: ld a,1

......

Notes

• The step count must be specified within the range of 0 to 65,535. An error results if the limit is ex-

ceeded.

Error : Number of steps out of range, use 0-65535.

• If the [Data] window is opened, its display contents are updated after the execution.

• When the n command is executed, the multi break function is invalidated due to the hardware

specification while the program is running. It takes effect again after the next execution is completed.

• During a single-step operation, the program will not break even if the break condition set by a

command is met.

• Unlike in successive executions (g or gr command), the [Register] window is updated every time a

step is executed.

GUI utility

[Run | Next] menu item, [Next] button

When this menu item or button is selected, the n command without step count is executed.

[Next] button