Creating A New Vector Table - Motorola 700 Series Installation And Use Manual

Embedded controller
Table of Contents

Advertisement

Using the 162Bug Debugger

Creating a New Vector Table

4
*
***
BUILDX - Build exception vector table ****
*
BUILDX
MOVEC.L
LEA
MOVE.L
MOVE.W
LOOP
MOVE.L
SUBQ.W
BNE.B
MOVE.L
MOVE.L
MOVE.L
LEA.L
MOVE.L
MOVEC.L
RTS
END
4-16
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 at the new vector table. In
order to use the debugger facilities you can copy the proper vectors
from the 162Bug vector table into the corresponding vector
locations in your program vector table.
The vector for the 162Bug generalized exception handler 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:
VBR,A0
$10000,A1
$80(A0),D0
$3FC,D1
D0,(A1,D1)
#4,D1
LOOP
$10(A0),$10(A1)
$24(A0),$24(A1)
$BC(A0),$BC(A1)
COPROCC(PC),A2
A2,$2C(A1)
A1,VBR
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

This manual is also suitable for:

800 seriesMvme162lx

Table of Contents