HP 64746 User Manual page 156

Emulation/analysis
Table of Contents

Advertisement

Chapter 5: Plugging into a Target System
Configuring the Emulator for In-Circuit Operation
XDEF
ORG
DC.L
DC.L
DC.L
DC.L
ORG
RESET
MOVE.W
MOVEA.L
MOVE.W
MOVE.W
MOVE.W
MOVE.W
NOP
CP_VECTORS MOVEA.L
MOVEA.L
DO_COPY
MOVE.L
CMPA.L
BNE
NOP
NOP
CS_INIT
NOP
; the following instructions move code into on-chip RAM, then jump to it.
; A2 is used to point to where ROM WILL be.
MOVEA.L
MOVEA.L
MOVE.L
MOVE.L
MOVE.L
MOVE.W
JMP
NOP
SWITCHED
NOP
NOP
MOVE.L
NOP
BUS_ERROR
JMP
ADDR_ERROR JMP
What happens first? The first thing that needs to be done is for you to copy your
startup code that will exist in ROM beginning at 400400H to address 400H because
what will eventually be address 400400H is address 400H immediately following a
reset (because chip-select 0 maps to address 0). To do this, you can use a command
that is only available from the terminal interface or pod command. Execute the
command:
pod_command "cp 0=400000..401fff" <RETURN>
This will cause the first 8 Kbytes of code that was loaded at 400000H to be copied
to emulation RAM beginning at 0. Doing this will make the emulator act like your
156
SWITCHED
$400000
$10000
; Stack begins at $0FFFE
RESET-$400000
; Reset initialization code
BUS_ERROR
ADDR_ERROR
$400400
#$0800,$F2
; Set up the BAR for $800XXX
#$800000,A0
#$3FC2,($832,A0)
; OR0 - 128K, read-only, 1 wait-state
#$0001,($830,A0)
; BR0 - base address 0
#$1FE0,($836,A0)
; OR1 - 64K, read-write, 0 wait-state
#$0801,($834,A0)
; BR1 - base address $400000
#0,A3
; pointer to vector table
#$400000,A4
; where to copy it
(A3)+,(A4)+
#$400,A3
; at the end?
DO_COPY
; now the vector table is in ROM and RAM
#SWITCHED,A2
A0,A1
#$317CA001,(A1)+
#$0834317C,(A1)+
#$C8010830,(A1)+
#$4ED2,(A1)+
(A0)
; it's switched now!!!!!!!
0,D0
; read vector 0
BUS_ERROR
ADDR_ERROR

Advertisement

Table of Contents
loading

This manual is also suitable for:

68302

Table of Contents