Download Print this page

ZiLOG Z80 Handbook page 245

Hide thumbs Also See for Z80:

Advertisement

15
LF
(C ' unchanged)
16 17
LF
(D' modified to 17 from 16)
17 18
CO
(E' modified to 18 from 17)
BREAK sets a breakpoint at address AAAA. A breakpoint is an
instruction location which, when executed, returns control to a moni-
tor, or debugging program. A typical debugging method is to set a
breakpoint, execute the program that is being debugged from a loca-
tion before the breakpoint, and then examine the contents of memory
and/or registers when the breakpoint is reached (if it is reached!).
The BREAK command replaces the instruction at the specified ad-
dress with a restart to 38H instruction. When the instruction that is
breakpointed is executed, the RST 38H is instead executed, and the
breakpoint routine is entered. The contents of all registers are then
saved and a message indicating that the breakpoint has been reached
is printed by the monitor. If the optional N field is entered along
with the address of the breakpoint, the breakpointed instruction at
AAAA will execute N times before the break occurs. This is helpful
in breakpointing iterative code, as it eliminates a breakpoint at each
repetitions of an instruction. To set a breakpoint at location 10AAH
after 123H times through a loop, the following command would be
entered:
BREAK IOAA 123 C®
The JUMP command causes the monitor to jump to the specified
address. If previous breakpoint was entered , all registers are restored
to their contents before the breakpoint. The following command
starts execution at location 123AH:
JUMP 123A CR
The GO command is similar to the JUMP command, except that
it is used after a breakpoint to continue execution from the break-
pointed location.
The PUNCH and LOAD commands are used to save and restore
the contents of memory. Typically, this would be done after debug-
ging a program or partially debugging a program by patching.
PUNCHing the contents of a block of memory saves the contents of
memory on paper tape; the paper tape can subsequently be reloaded
by a LOAD command to restore the previous contents.
The format of the PUNCH command specifies a starting address
for the punch and an ending address for the punch. To save locations
1000H through 1FFFH on paper tape, the command would be:
PUNCH 1000 1 FFF C®
254

Advertisement

loading
Need help?

Need help?

Do you have a question about the Z80 and is the answer not in the manual?