2 Copyright © 1995-2013, The AROS Development Team. All rights reserved.
5 Desc: ShutdownA() - Shut down the operating system.
9 #include <aros/debug.h>
10 #include <proto/exec.h>
12 #include "exec_util.h"
14 /* See rom/exec/shutdowna.c for documentation */
16 AROS_LH1(ULONG
, ShutdownA
,
17 AROS_LHA(ULONG
, action
, D0
),
18 struct ExecBase
*, SysBase
, 173, Exec
)
23 case SD_ACTION_POWEROFF
:
25 /* No stock Amiga hardware is known to support this.
26 * Emulation will support it (unless high compatibility setting enabled). */
27 typedef ULONG (*UAELIBFUNC
)(ULONG
);
28 UAELIBFUNC uaelibfunc
= NULL
;
31 uaeres
= OpenResource("uae.resource");
32 if (uaeres
) { /* new method that allows dynamic UAE ROM location */
33 uaelibfunc
= AROS_LVO_CALL1(APTR
,
34 AROS_LCA(UBYTE
*, "uaelib_demux", A0
),
37 if (uaelibfunc
== NULL
) {
38 /* old-style absolute address */
39 uaelibfunc
= (UAELIBFUNC
)(0x00F00000 + 0xFF60);
40 if ((((ULONG
*)uaelibfunc
)[0] & 0xff00ffff) != 0xa0004e75)
45 /* This may return. Quits when next vblank arrives */
51 case SD_ACTION_COLDREBOOT
: