Motorola MVME147 Installation And Use Manual page 190

Mpu vmemodule
Table of Contents

Advertisement

Debugger General Information
B
B-36
The vector for the Bug generalized exception handler (described in
detail in the Bug Generalized Exception Handler section in this
appendix) may be copied from offset $3C (Uninitialized Interrupt)
in the target vector table to all locations in your program vector
table where a separate exception handler is not used. This provides
diagnostic support in the event that your program is stopped by an
unexpected exception. The generalized exception handler gives a
formatted display of the target registers and identifies the type of
the exception.
The following is an example of a routine which builds a separate
vector table and then moves the VBR to point at it:
*
*** BUILDX - Build exception vector table ****
*
BUILDX
MOVEC.L
VBR,A0
LEA
$10000,A1
MOVE.L
$3C(A0),D0
MOVE.W
$3FC,D1
LOOP
MOVE.L
D0,(A1,D1)
SUBQ.W
#4,D1
BNE.B
LOOP
MOVE.L
$8(A0),$8(A1)
MOVE.L
$10(A0),$10(A1)
MOVE.L
$24(A0),$24(A1)
MOVE.L
$BC(A0),$BC(A1)
MOVE.L
$108(A0),$108(A1)
LEA.L
COPROCC(PC),A2
MOVE.L
A2,$2C(A1)
MOVEC.L
A1,VBR
RTS
END
It may happen that your program uses one or more of the exception
vectors that are required for debugger operation. Debugger
facilities may still be used, however, if your exception handler can
determine when to handle the exception itself and when to pass the
exception to the debugger.
When an exception occurs which you want to pass on to the
debugger; e.g., Abort, your exception handler must read the vector
offset from the format word of the exception stack frame. This offset
Get copy of VBR
New vectors at $10000
Get generalized exception vector
Load count (all vectors)
Store generalized exception vector
Initialize entire vector table
Copy bus error vector
Copy breakpoints vector
Copy trace vector
Copy system call vector
Copy ABORT vector
Get your exception vector
Install as F-Line handler
Change VBR to new table

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents