add the bcm2836 peripheral base, and fix a typo
[AROS.git] / test / dos / exit.c
blob1a695aff2b667dba1b9b5a364addc5714d8e5491
1 /*
2 Copyright © 1995-2014, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #include <proto/exec.h>
7 #include <proto/dos.h>
9 struct DosLibrary *DOSBase;
10 static unsigned int level = 0;
12 void test()
14 Printf("Nest level: %lu\n", ++level);
16 if (level < 20)
17 test();
19 Exit(0);
20 Printf("Exit() did not work!\n");
23 __startup static AROS_PROCH(Start, argstr, argsize, SysBase)
25 AROS_PROCFUNC_INIT
27 struct Process *me;
28 IPTR *stackbase;
30 DOSBase = (struct DosLibrary *)OpenLibrary("dos.library", 36);
31 if (!DOSBase)
32 return RETURN_FAIL;
34 /* Let's check correctness of stack size passing */
35 me = (struct Process *)FindTask(NULL);
36 stackbase = me->pr_ReturnAddr;
37 Printf("Launch stack size is %ld, total size is %ld\n", stackbase[0], me->pr_Task.tc_SPUpper - me->pr_Task.tc_SPLower);
39 test();
41 CloseLibrary(&DOSBase->dl_lib);
42 return RETURN_OK;
44 AROS_PROCFUNC_EXIT