Cpu32Bug Generalized Exception Handler - Motorola M68CPU32BUG User Manual

Debug monitor
Table of Contents

Advertisement

EXAMPLE
*
*** EXCEPT - Exception handler ****
*
EXCEPT
SUBQ.L
LINK
MOVEM.L
: decide here if user code will handle exception, if so, branch...
MOVE.L
MOVE.W
AND.W
MOVE.L
UNLK
RTS

2.5.2.3 CPU32Bug Generalized Exception Handler

The CPU32Bug generalized exception handler supervises all exceptions not listed in Table 2-2.
For these exceptions, the target stack pointer points to the top of the user exception stack frame.
In this way, if an unexpected exception occurs during user code segment execution, the exception
stack frame displays to assist in determining the cause of the exception.
EXAMPLE
CPU32Bug>RD<CR>
PC
=00003000
SFC =5=SD
D0
=00000000
D4
=00000000
A0
=00000000
A4
=00000000
00003000 203900F0
CPU32Bug>T<CR>
Exception: Bus Error
Format/Vector=C008
SSW=0065
Fault Addr.=00F00000
PC
=00003000
SFC =5=SD
D0
=00000000
D4
=00000000
A0
=00000000
A4
=00000000
00003000 203900F0
CPU32Bug>
M68CPU32BUG/D REV 1
The user exception handler passes an exception along to the debugger.
#4,A7
A6,#0
A0-A5/D0-D7,-(A7)
BUFVBR,A0
14(A6), Do
#$0FFF,D0
(A0,D0.W),4(A6)
Bus error at address $F00000. It is assumed for this example that an access
of memory location $F00000 initiates bus error exception processing.
SR
=2700=TR:OFF_S_7_....
DFC =5=SD
D1
=00000000
D5
=00000000
A1
=00000000
A5
=00000000
0000
MOVE.L
Data=FFFF3000
SR
=A700=TR:ALL_S_7_....
DFC =5=SD
D1
=00000000
D5
=00000000
A1
=00000000
A5
=00000000
0000
MOVE.L
Save space in stack for a PC value.
Frame pointer for accessing PC space.
Save registers.
Pass exception to debugger; Get VBR.
Get the vector offset from stack frame.
Mask off the format information.
Store address of debugger exception handler.
A6
Put address of exception handler into PC and go.
USP =0000FC00
D2
=00000000
D6
=00000000
A2
=00000000
A6
=00000000
($F00000).L,D0
Cur. PC=00003000 Cnt. Reg.=0001
USP =0000FC00
D2
=00000000
D6
=00000000
A2
=00000000
A6
=00000000
($F00000).L,D0
2-11
DEBUG MONITOR DESCRIPTION
VBR =00000000
SSP* =00004000
D3
=00000000
D7
=00000000
A3
=00000000
A7
=00004000
VBR =00000000
SSP* =00003FE8
D3
=00000000
D7
=00000000
A3
=00000000
A7
=00003FE8

Advertisement

Table of Contents
loading

Table of Contents