revert between 56095 -> 55830 in arch
[AROS.git] / developer / debug / test / library / dummylib.c
blobf076907af0dc4ec872894c23e2f2c9b77cc4440b
1 /*
2 Copyright © 1995-2017, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc:
6 Lang:
7 */
9 #include <stdarg.h>
10 #include <exec/types.h>
11 #include <aros/libcall.h>
12 #include <proto/dos.h>
13 #include <proto/exec.h>
14 #define DUMMY_NOLIBINLINE
15 #define DUMMY_NOLIBDEFINES
16 #include <proto/dummy.h>
18 #include LC_LIBDEFS_FILE
20 #include "dummybase.h"
22 AROS_LH2(ULONG, add,
23 AROS_LHA(ULONG,a,D0),
24 AROS_LHA(ULONG,b,D1),
25 struct DummyBase *,DummyBase,5,Dummy
28 AROS_LIBFUNC_INIT
29 return (DummyBase->lastval = a+b);
30 AROS_LIBFUNC_EXIT
33 AROS_LH2(ULONG, __int_asl,
34 AROS_LHA(ULONG,a,D0),
35 AROS_LHA(ULONG,b,D1),
36 struct DummyBase *,DummyBase,6,Dummy
39 AROS_LIBFUNC_INIT
40 return (DummyBase->lastval = a<<b);
41 AROS_LIBFUNC_EXIT
44 LONG printx(LONG nargs, ...)
46 struct DummyBase *DummyBase = (struct DummyBase *)__aros_getbase_DummyBase();
47 struct Library *DOSBase = OpenLibrary("dos.library", 0);
48 va_list args;
49 LONG i, baseval = 0;
51 baseval = DummyBase->lastval;
53 va_start(args, nargs);
55 if (DOSBase) {
56 for (i = 0; i < nargs; i++) {
57 Printf("\t%ld: %ld\n", i, baseval + (LONG)va_arg(args, STACKED LONG));
61 va_end(args);
63 return nargs;