Chapter 4: Connecting the Emulator to a Target System
Installing Emulator Features
Software breakpoint entry into the background
monitor
The background monitor can also be entered via a software breakpoint. The
emulator will respond to any BGND instruction in the code, regardless of whether
breakpoints are enabled, or whether or not the BGND instruction was inserted by
the emulator. Breakpoints are enabled by the following command.
bc -e bp
Set breakpoints only on the initial word of an instruction (operation word);
otherwise, they will be assumed to be extension words and not be executed.
Instead, they might alter an earlier instruction, unintentionally. The emulator
places a breakpoint by modifying memory to insert a breakpoint instruction at the
address specified. If the memory at the address specified is ROM or cannot be
modified for some other reason, the breakpoint cannot be set.
b
bp <instruction address>
When a BGND instruction is executed, the processor immediately transitions to the
background monitor.
Stepping with the background monitor
The last feature of the background monitor which needs to be evaluated is the
single-stepping facility. The emulator uses the BKPT signal to reenter the monitor
when the first instruction outside the monitor is executed.
b
tsto any
tg any
t
s
0000100@sp
4e71
NOP
PC = 0000102@sp
81