Tests/Library: Update to new genmodule interfaces
[AROS.git] / test / library / dummylib.c
blob1ce7846c282e485f04e4dff4f6da690b121704b6
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>
14 #include LC_LIBDEFS_FILE
16 #include "dummybase.h"
18 AROS_LH2(ULONG, add,
19 AROS_LHA(ULONG,a,D0),
20 AROS_LHA(ULONG,b,D1),
21 struct DummyBase *,DummyBase,5,Dummy
24 AROS_LIBFUNC_INIT
25 return (DummyBase->lastval = a+b);
26 AROS_LIBFUNC_EXIT
29 AROS_LH2(ULONG, __int_asl,
30 AROS_LHA(ULONG,a,D0),
31 AROS_LHA(ULONG,b,D1),
32 struct DummyBase *,DummyBase,6,Dummy
35 AROS_LIBFUNC_INIT
36 return (DummyBase->lastval = a<<b);
37 AROS_LIBFUNC_EXIT
40 LONG printx(LONG nargs, ...)
42 struct DummyBase *DummyBase = __aros_getbase();
43 struct Library *DOSBase = OpenLibrary("dos.library", 0);
44 va_list args;
45 LONG i;
47 va_start(args, nargs);
49 if (DOSBase) {
50 for (i = 0; i < nargs; i++) {
51 Printf("\t%ld: %ld\n", i, DummyBase->lastval + va_arg(args, LONG));
55 va_end(args);
57 return nargs;