Motorola M68CPU32BUG Bedienungsanleitung Seite 26

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 196
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 25
DEBUG MONITOR DESCRIPTION
M68CPU32BUG/D REV 1 2-10
2.5.2.2 Creating Vector Tables
A user program may create a separate vector table to store its exception vectors. If this is done,
the user program must change the value of the vector base register to point to the new vector
table. To use the debugger facilities, copy the vectors from the CPU32Bug vector table into the
corresponding user vector table locations (block of memory move (BM) command).
The vector for the CPU32Bug generalized exception handler (described in detail in paragraph
2.5.2.3) may be copied from offset $08 (Bus Error vector) in the target-vector table to all
locations in the user’s vector table where a separate exception handler is not used. This provides
diagnostic support in the event execution of the user program is terminated 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 user routine which builds a separate vector table and then sets
the vector base register to point at it.
*
*** BUILDX
Build exception vector table ***
*
BUILDX MOVEC.L VBR,A0
Get copy of VBR.
LEA $1 0000,A1
New vectors at $10000.
MOVE.L $8(A0),D0
Get generalized exception vector.
MOVE.W $3FC,D1
Load count (all vectors).
LOOP MOVE.L D0,(A1,D1)
Store generalized exception vector.
SU BQ.W #4, D 1
BPL.B LOOP
Initialize entire vector table.
MOVE.L $1 0(A0),$1 0(A1 )
Copy breakpoints vector.
MOVE.L $24(A0),$24(A1 )
Copy trace vector.
MOVE.L $BC(A0),$BC(A1 )
Copy system call vector.
LEA.L TIMER(PC),A2
Get user exception vector.
MOVE.L A2,$2C(A1 )
Install as F-Line handler.
MOVEC.L A1 ,VBR
Change VBR to new table.
RTS
END
The user program may use one or more of the exception vectors that are required for debugger
operation if the user’s exception handler can determine when to handle the exception itself and
when to pass the exception to the debugger.
When an exception occurs which requires debugger operation (i.e., ABORT), the user’s
exception handler must read the vector offset from the exception-stack-frame format word. This
offset is added to the address of the CPU32Bug target program vector table (which the user
program saves), producing the address of the CPU32Bug exception vector. The user program
then jumps to the address stored at this vector location (i.e., which is the address of the
CPU32Bug exception handler).
The user program must ensure an exception stack frame is in the stack and that it is identical to
one the processor would create for the particular exception. It may then jump to the address of
the exception handler.
Seitenansicht 25
1 2 ... 21 22 23 24 25 26 27 28 29 30 31 ... 195 196

Kommentare zu diesen Handbüchern

Keine Kommentare