Preserving the Debugger Operating Environment
http://www.mcg.mot.com/literature
4-15
4
The following is an example of an exception handler which can pass an
exception along to the debugger:
*
*** EXCEPT - Exception handler ****
*
EXCEPT SUBQ.L #4,A7 Save space in stack for a PC value.
LINK A6,#0 Frame pointer for accessing PC space.
MOVEM.L A0-A5/D0-D7,-(SP) Save registers.
:
: decide here if your code handles exception, if so, branch...
:
MOVE.L BUFVBR,A0 Pass exception to debugger; Get saved VBR.
MOVE.W 14(A6),D0 Get the vector offset from stack frame.
AND.W #$0FFF,D0 Mask off the format information.
MOVE.L (A0,D0.W),4(A6) Store address of debugger exc handler.
MOVEM.L (SP)+,A0-A5/D0-D7 Restore registers.
UNLK A6
RTS Put addr of exc handler into PC and go.
162Bug Generalized Exception Handler
The 162Bug has a generalized exception handler which it uses to handle
all of the exceptions not listed in Table 4-2. For all these exceptions, the
target stack pointer is left pointing to the top of the exception stack frame
created. In this way, if an unexpected exception occurs during execution of
your code, you are presented with the exception stack frame to help
determine the cause of the exception. The following example illustrates
this:
Example: Bus error at address $F00000. It is assumed for this example that
an access of memory location $F00000 initiates bus error exception
processing.
Summary of Contents for MVME162LX 200 Series
Page 1: ...MVME162LX 200 300 Series Embedded Controller Installation and Use V162LX2 3A IH3 ...
Page 6: ......
Page 14: ...xiv ...
Page 66: ...1 52 Computer Group Literature Center Web Site Board Level Hardware Description 1 ...
Page 84: ...2 18 Computer Group Literature Center Web Site Hardware Preparation and Installation 2 ...
Page 108: ...3 24 Computer Group Literature Center Web Site Debugger General Information 3 ...
Page 158: ...C 2 Computer Group Literature Center Web Site C ...
Page 164: ...Ethernet Interconnections E 2 Computer Group Literature Center Web Site E ...
Page 200: ...J 4 Computer Group Literature Center Web Site J ...
Page 208: ...Index IN 8 Computer Group Literature Center Web Site I N D E X ...