protect access to the buslist
[AROS.git] / test / library / dummylib.c
blob5d3ca3159fe3a901e00a3c2bc7b6f62757fa4eca
1 /*
2 Copyright © 1995-2012, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc:
6 Lang:
7 */
8 #include <stdarg.h>
9 #include <exec/types.h>
10 #include <aros/libcall.h>
11 #include <proto/dos.h>
12 #include <proto/exec.h>
13 #define DUMMY_NOLIBINLINE
14 #define DUMMY_NOLIBDEFINES
15 #include <proto/dummy.h>
17 #include LC_LIBDEFS_FILE
19 #include "dummybase.h"
21 AROS_LH2(ULONG, add,
22 AROS_LHA(ULONG,a,D0),
23 AROS_LHA(ULONG,b,D1),
24 struct DummyBase *,DummyBase,5,Dummy
27 AROS_LIBFUNC_INIT
28 return (DummyBase->lastval = a+b);
29 AROS_LIBFUNC_EXIT
32 AROS_LH2(ULONG, __int_asl,
33 AROS_LHA(ULONG,a,D0),
34 AROS_LHA(ULONG,b,D1),
35 struct DummyBase *,DummyBase,6,Dummy
38 AROS_LIBFUNC_INIT
39 return (DummyBase->lastval = a<<b);
40 AROS_LIBFUNC_EXIT
43 LONG printx(LONG nargs, ...)
45 struct DummyBase *DummyBase = __aros_getbase_DummyBase();
46 struct Library *DOSBase = OpenLibrary("dos.library", 0);
47 va_list args;
48 LONG i;
50 va_start(args, nargs);
52 if (DOSBase) {
53 for (i = 0; i < nargs; i++) {
54 Printf("\t%ld: %ld\n", i, DummyBase->lastval + va_arg(args, LONG));
58 va_end(args);
60 return nargs;