Motorola M68CPU32BUG User Manual Page 27

  • Download
  • Add to my manuals
  • Print
  • Page
    / 196
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 26
DEBUG MONITOR DESCRIPTION
M68CPU32BUG/D REV 1 2-11
EXAMPLE The user exception handler passes 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,-(A7)
Save registers.
: decide here if user code will handle exception, if so, branch...
MOVE.L BUFVBR,A0
Pass exception to debugger; Get VBR.
MOVE.W 14(A6), Do
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 exception handler.
UNLK
A6
RTS
Put address of exception handler into PC and go.
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 Bus error at address $F00000. It is assumed for this example that an access
of memory location $F00000 initiates bus error exception processing.
CPU32Bug>RD<CR>
PC =00003000 SR =2700=TR:OFF_S_7_.... VBR =00000000
SFC =5=SD DFC =5=SD USP =0000FC00 SSP* =00004000
D0 =00000000 D1 =00000000 D2 =00000000 D3 =00000000
D4 =00000000 D5 =00000000 D6 =00000000 D7 =00000000
A0 =00000000 A1 =00000000 A2 =00000000 A3 =00000000
A4 =00000000 A5 =00000000 A6 =00000000 A7 =00004000
00003000 203900F0 0000 MOVE.L ($F00000).L,D0
CPU32Bug>T<CR>
Exception: Bus Error
Format/Vector=C008
SSW=0065 Fault Addr.=00F00000 Data=FFFF3000 Cur. PC=00003000 Cnt. Reg.=0001
PC =00003000 SR =A700=TR:ALL_S_7_.... VBR =00000000
SFC =5=SD DFC =5=SD USP =0000FC00 SSP* =00003FE8
D0 =00000000 D1 =00000000 D2 =00000000 D3 =00000000
D4 =00000000 D5 =00000000 D6 =00000000 D7 =00000000
A0 =00000000 A1 =00000000 A2 =00000000 A3 =00000000
A4 =00000000 A5 =00000000 A6 =00000000 A7 =00003FE8
00003000 203900F0 0000 MOVE.L ($F00000).L,D0
CPU32Bug>
Page view 26
1 2 ... 22 23 24 25 26 27 28 29 30 31 32 ... 195 196

Comments to this Manuals

No comments