HP 64746 User Manual page 159

Emulation/analysis
Table of Contents

Advertisement

Method 2: Using Your Initialization Code to Set the Interrupt Mode
Execute a small section of initialization code that sets the GIMR register to the
proper value, and break into the monitor immediately after that using either a
software or analysis breakpoint.
Here is an example that shows how this works using an analysis breakpoint. In this
case, an analysis breakpoint is useful because it will confirm that everything is
working properly (if you use a software breakpoint, the emulator does not issue a
level 7 interrupt, so that would not test the interrupt mode):
Start with the following program loaded in either emulation or target memory:
XDEF
CS_INIT,GIMR_INIT
ORG
$0
DC.L
$440000
DC.L
$400
ORG
$400
MOVE.W
#$0800,$F2
MOVEA.L
#$800000,A0
MOVE.W
#$3F02,($832,A0)
MOVE.W
#$0001,($830,A0)
MOVE.W
#$1F80,($836,A0)
MOVE.W
#$0801,($834,A0)
NOP
CS_INIT
NOP
NOP
MOVE.W
#$8740,($812,A0)
NOP
NOP
GIMR_INIT
NOP
NOP
NOP
NOP
Assuming you have loaded the above example into emulation or target memory,
you can now use the commands:
trace about GIMR_INIT break_on_trigger <RETURN>
run from reset <RETURN>
When the emulator breaks into the monitor, the 68302 will be in dedicated mode.
You can now use the step and break command.
Note that if you are just starting to debug your initialization code, and would like to
step through each of your startup instructions, you should use Method 1.
Chapter 5: Plugging into a Target System
Configuring the Emulator for In-Circuit Operation
; Stack begins at $43FFFE
; Reset initialization code
; Set up the BAR for $800XXX
; OR0 - 512K, read-only, 1 wait-state
; BR0 - base address 0
; OR1 - 256K, read-write, 0 wait-state
; BR1 - base address $400000
; set for dedicated mode interrupt
159

Advertisement

Table of Contents
loading

This manual is also suitable for:

68302

Table of Contents