Creating A New Vector Table - Motorola MVME177 Installation And Use Manual

Single board computer
Hide thumbs Also See for MVME177:
Table of Contents

Advertisement

Debugger General Information

Creating a New Vector Table

B
*
***
*
BUILDX
LOOP
B-40
Your program may create a separate vector table in memory to
contain its exception vectors. If this is done, the program must
change the value of the VBR to point to the new vector table. In
order to use the debugger facilities you can copy the proper vectors
from the 177Bug vector table into the corresponding vector
locations in your program vector table.
The vector for the 177Bug generalized exception handler (described
in detail in the 177Bug Generalized Exception Handler section in this
chapter) may be copied from offset $08 (bus error vector) 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 ****
MOVEC.L
VBR,A0
LEA
$10000,A1
MOVE.L
$80(A0),D0
MOVE.W
$3FC,D1
MOVE.L
D0,(A1,D1)
SUBQ.W
#4,D1
BNE.B
LOOP
MOVE.L
$10(A0),$10(A1)
MOVE.L
$24(A0),$24(A1)
MOVE.L
$BC(A0),$BC(A1)
LEA.L
COPROCC(PC),A2
MOVE.L
A2,$2C(A1)
MOVEC.L
A1,VBR
RTS
END
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 breakpoints vector.
Copy trace vector.
Copy system call vector.
Get your exception vector.
Install as F-Line handler.
Change VBR to new table.

Advertisement

Table of Contents
loading

Table of Contents