2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
6 /*****************************************************************************
10 AROS_LH0(APTR, SuperState,
15 struct ExecBase *, SysBase, 25, Exec)
18 Enter supervisor mode (like Supervisor()), but return on the normal
19 user stack, so that user stack variables are still there. A call
20 to Userstate() will end this mode.
25 Old supervisor stack. NULL if called from supervisor mode.
28 The user stack must be big enough to hold all possible nestings
36 UserState(), Supervisor()
42 ******************************************************************************/
44 #include "aros/m68k/asm.h"
48 .globl AROS_SLIB_ENTRY(SuperState,Exec,25)
49 .type AROS_SLIB_ENTRY(SuperState,Exec,25),@function
50 AROS_SLIB_ENTRY(SuperState,Exec,25):
51 /* Goto supervisor mode. Preserve a5 in d0 (faster than stack space) */
55 /* Do not change user stack - use jmp */
61 /* Check if called from supervisor mode */
65 /* Called from supervisor mode. Just return NULL. */
70 /* Called from user mode. Restore sp and return supervisor sp. */
74 /* usp already points to the returnaddress for the SuperState() call. */