2018-03-03 01:03:32 +00:00
|
|
|
#include "defs.h"
|
|
|
|
#include "eval.h"
|
|
|
|
#include "stack.h"
|
|
|
|
#include "word.h"
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <string.h>
|
|
|
|
|
|
|
|
void
|
|
|
|
hello(void)
|
|
|
|
{
|
|
|
|
printf("hello, world\n");
|
|
|
|
}
|
|
|
|
|
|
|
|
int
|
|
|
|
main(void)
|
|
|
|
{
|
|
|
|
dstack_push(2);
|
|
|
|
dstack_push(3);
|
|
|
|
|
|
|
|
uint8_t arena[128] = {0};
|
|
|
|
uintptr_t arena_p = (uintptr_t)arena;
|
2018-03-05 20:04:09 +00:00
|
|
|
store_native(arena, "hello", 5, hello);
|
2018-03-03 01:03:32 +00:00
|
|
|
|
|
|
|
cwexec(arena_p);
|
|
|
|
|
|
|
|
printf("finished\n");
|
|
|
|
}
|