Zilog Z80195 User Manual

Page 28

Advertising
background image

Z80185/195 D

EVELOPMENT

K

IT

U

SER

'

S

M

ANUAL

3-8

UM951800100

Z

ILOG

Fill Memory [F]

This commands fills memory with a specified byte value. The desired numbers of bytes can be up
to 65K.

Be careful with overwriting monitors RAM variables, which are typically at addresses 2000-20FF.

Example:

Z80185>Fill Memory starting at: 8000

With data: 77

Number of Bytes: 3

Z80185>Display Memory Starting at: 8000

Number of Bytes : 3

8000 77 77 77

www

Z80185>

Caution:

RAM locations 2000-20FF are used by the monitor program as workspace. F, M, and L

commands should not be used within this memory range.

Go to Program [G]

This command transfers Z80185 execution from the monitor program to user code. If an address is
supplied, it is used as the users PC for execution. If no address is supplied, the value that was stored
in the PC register is used as the starting address. The PC register is initialized to 2100 hex. Before
the monitor sets the user program into execution, it proceeds as follows:

1. Checks to see if the opcode at the starting address is a hard-coded RST 28H. If so, it advances

the starting address over the RST 28H and proceeds to Step 3.

2. If not, it checks for a breakpoint at the starting address. If so, it invokes an implicit T command,

to single step over the first instruction, returning to Step 3 when this has been completed.

3. For each breakpoint, it saves the opcode at that address in a RAM table and substitutes the

opcode RST 28H (EF).

4. It stacks the starting address and restores all the user register values that were saved in the last

RESET, breakpoint, hard-coded RST 28, or NMI, and may have modified since then.

5. It enables or disables interrupts per the saved EI value.
6. It uses a RET instruction to begin execution at the starting address stacked in Step 4.

After a G command, there are several ways that control can return to the monitor: if execution comes
to an RST 28 instruction, either due to a breakpoint or hard-coded one, if execution comes to an illegal
instruction, or when pressing the NMI or RESET buttons. In all the above cases the monitor saves the
register contents and program counter and restores the opcodes of any breakpoints that were set.
Then it displays the register contents, program counter, and (for NMI or an illegal instruction) a
message why execution stopped.

Example:

Z80185> Go Starting at Address :

Advertising