- Removed unused HandleEvent method.
[AROS.git] / arch / m68k-all / exec / userstate.S
blob1c8644952faf3187fc503453668c6d329a26386f
1 /*
2     Copyright © 1995-2001, The AROS Development Team. All rights reserved.
3     $Id$
4 */
6 /*****************************************************************************
7  
8     NAME
9  
10         AROS_LH1(void, UserState,
12     SYNOPSIS
13         AROS_LHA(APTR, sysStack, D0),
15     LOCATION
16         struct ExecBase *, SysBase, 26, Exec)
18     FUNCTION
19         Return to user mode after a call to SuperState().
21     INPUTS
22         sysStack - The returncode from SuperState().
24     RESULT
26     NOTES
28     EXAMPLE
30     BUGS
32     SEE ALSO
33         SuperState(), Supervisor()
35     INTERNALS
37     HISTORY
39 ******************************************************************************/
41         #include "aros/m68k/asm.h"
43         .text
44         .balign 4
45         .globl  AROS_SLIB_ENTRY(UserState,Exec,26)
46         .type   AROS_SLIB_ENTRY(UserState,Exec,26),@function
47 AROS_SLIB_ENTRY(UserState,Exec,26):
48         /* simply return if argument is NULL */
49         tst.l   %d0
50         bne     nonzero
51         rts
52 nonzero:
53         /* Transfer sp */
54         move.l  %sp,%usp
56         /* Set old supervisor sp */
57         move.l  %d0,%sp
59         /* And return. This jumps directly to a rts. */
60         rte