2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
6 /*****************************************************************************
10 AROS_LH1(ULONG, Supervisor,
13 AROS_LHA(ULONG_FUNC, userFunction, A5),
16 struct ExecBase *, SysBase, 5, Exec)
19 Call a routine in supervisor mode. This routine runs on the
20 supervisor stack and must end with a "rte". No registers are spilled,
21 i.e. Supervisor() effectively works like a function call.
24 userFunction - address of the function to be called.
27 whatever the function left in the registers
30 This function is CPU dependent.
35 Context switches that happen during the duration of this call are lost.
43 ******************************************************************************/
45 #include "../include/aros/machine.i"
49 .globl AROS_SLIB_ENTRY(Supervisor,Exec)
51 AROS_SLIB_ENTRY(Supervisor,Exec):
52 // userFunction parameter is in r0
56 swi #8 // #8 => call software interrupt handler
60 .globl _sys_trap_Supervisor
63 mov lr, pc // should add 4 to lr here?