aboutsummaryrefslogtreecommitdiff
path: root/scaf/system/scaf_feeder_test.c
diff options
context:
space:
mode:
authorTom Schouten <doelie@users.sourceforge.net>2003-01-21 10:27:33 +0000
committerTom Schouten <doelie@users.sourceforge.net>2003-01-21 10:27:33 +0000
commit9b8745d5250c9d0b60c9aa5a77f58a3fcddf1076 (patch)
tree8372b6a414a7124cec57efc9c80845e2bc1b157d /scaf/system/scaf_feeder_test.c
This commit was generated by cvs2svn to compensate for changes in r352,svn2git-root
which included commits to RCS files with non-trunk default branches. svn path=/trunk/externals/pdp/; revision=353
Diffstat (limited to 'scaf/system/scaf_feeder_test.c')
-rw-r--r--scaf/system/scaf_feeder_test.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/scaf/system/scaf_feeder_test.c b/scaf/system/scaf_feeder_test.c
new file mode 100644
index 0000000..23a2661
--- /dev/null
+++ b/scaf/system/scaf_feeder_test.c
@@ -0,0 +1,30 @@
+#include <dlfcn.h>
+
+void scaf_feeder_asm (void *tos, void *reg, void (*ca_rule)(), void *env);
+
+void ca_test() {}
+
+main()
+{
+ int stack[256];
+ int reg[8];
+ int env[8];
+
+ void *libhandle;
+ void *ca_routine;
+
+
+ if (!(libhandle = dlopen("../modules/test.scafo", RTLD_NOW))){
+ printf("error: %s\n", dlerror());
+ exit(1);
+ }
+
+ if (!(ca_routine = dlsym(libhandle, "carule_1"))){
+ printf("error: %s\n", dlerror());
+ exit(1);
+ }
+
+ scaf_feeder_asm(stack+254, reg, ca_routine, env);
+
+ dlclose(libhandle);
+}