2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
5 Desc: Exec function Exception
9 /******************************************************************************
12 AROS_LH0(void, Exception,
15 struct ExecBase *, SysBase, 11, Exec)
35 ******************************************************************************/
41 .globl AROS_SLIB_ENTRY(Exception,Exec)
42 .type AROS_SLIB_ENTRY(Exception,Exec),@function
43 AROS_SLIB_ENTRY
(Exception
,Exec
):
44 movem.
l %a2
/%a6
/%d2
,-(%sp
)
45 /* First clear task exception bit. */
49 move.
l ThisTask
(%a6
),%a2
50 bclr #TB_EXCEPT,tc_Flags(%a2)
52 /* If the exception is raised out of Wait IDNestCnt may be >0 */
53 move.
b IDNestCnt
(%a6
),%d2
54 /* Set it to a defined value */
57 .exloop: /* Get mask of signals causing the exception */
58 move.
l tc_SigExcept
(%a2
),%d0
59 and.l tc_SigRecvd
(%a2
),%d0
63 eor.
l %d0
,tc_SigExcept
(%a2
)
64 eor.
l %d0
,tc_SigRecvd
(%a2
)
66 /* Raise exception. Enable Interrupts */
67 move.
l tc_ExceptData
(%a2
),%a1
77 move.
l tc_ExceptCode
(%a2
),%a0
87 /* Re-use returned bits */
88 or.l %d0
,tc_SigExcept
(%a2
)
91 .excend: /* Restore IDNestCnt and return */
92 move.
b %d2
,IDNestCnt
(%a6
)
93 movem.
l (%sp
)+,%a2
/%a6
/%d2