2 Copyright © 1995-2011, The AROS Development Team. All rights reserved.
9 #include <aros/debug.h>
10 #include <aros/asmcall.h>
12 #include "dos_intern.h"
14 AROS_UFP2(ULONG
, BCPL_Exit
,
15 AROS_UFPA(LONG
, returnCode
, D1
),
16 AROS_UFPA(struct DosLibrary
*, DOSBase
, A6
));
19 AROS_LHA(LONG
, returnCode
, D1
),
20 struct DosLibrary
*, DOSBase
, 24, Dos
)
24 AROS_UFC2(ULONG
, BCPL_Exit
,
25 AROS_UFCA(LONG
, returnCode
, D1
),
26 AROS_UFCA(struct DosLibrary
*, DOSBase
, A6
));
31 extern ULONG
AOS_CallEntry(void);
34 * This entry code is used by CreateNewProc(). It supposes that it calls
35 * normal C code and follows AROS ABI conventions by putting SysBase into A6.
36 * Note that it still needs to set pr_ReturnAddr.
37 * pr_ReturnAddr value is used by AROS libc as program identifier (it is
38 * supposed to contain a unique value per program).
40 ULONG
CallEntry(STRPTR argptr
, ULONG argsize
, LONG_FUNC entry
, struct Process
*me
)
42 return AROS_UFC6(ULONG
, AOS_CallEntry
,
43 AROS_UFCA(ULONG
, argsize
, D0
),
44 AROS_UFCA(STRPTR
, argptr
, A0
),
45 AROS_UFCA(APTR
, me
->pr_Task
.tc_SPLower
, A1
),
46 AROS_UFCA(APTR
, me
->pr_GlobVec
, A2
),
47 AROS_UFCA(APTR
, &me
->pr_ReturnAddr
, A3
),
48 AROS_UFCA(LONG_FUNC
, entry
, A4
));