added concrete implementations of putc(), getc(), getchar() and gets()
[tangerine.git] / arch / .unmaintained / m68k-native / exec / userstate.s
blob073111865f9305d7b0798cae17c8731eef177a34
1 /*
2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 /*****************************************************************************
8 NAME
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 "machine.i"
43 .text
44 .balign 4
45 .globl AROS_SLIB_ENTRY(UserState,Exec)
46 .type AROS_SLIB_ENTRY(UserState,Exec),@function
47 AROS_SLIB_ENTRY(UserState,Exec):
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