39 lines
994 B
C
39 lines
994 B
C
#define MZ_PRECISE_GC
|
|
|
|
#include <racket/scheme.h>
|
|
#include <stdio.h>
|
|
|
|
extern const char _binary_app_zo_start;
|
|
extern const char _binary_app_zo_end;
|
|
|
|
static int run_bc(Scheme_Env *e, int argc, char *argv[]) {
|
|
Scheme_Object *l = NULL;
|
|
Scheme_Object *a[2] = { NULL, NULL };
|
|
|
|
MZ_GC_DECL_REG(5);
|
|
MZ_GC_VAR_IN_REG(0, e);
|
|
MZ_GC_VAR_IN_REG(1, l);
|
|
MZ_GC_ARRAY_VAR_IN_REG(2, a, 2);
|
|
MZ_GC_REG();
|
|
|
|
size_t load_size = ((uintptr_t) &_binary_app_zo_end) - ((uintptr_t) &_binary_app_zo_start);
|
|
scheme_register_embedded_load(load_size, &_binary_app_zo_start);
|
|
scheme_embedded_load(load_size, &_binary_app_zo_start, 1);
|
|
|
|
l = scheme_make_null();
|
|
l = scheme_make_pair(scheme_intern_symbol(APP_NAME), l);
|
|
l = scheme_make_pair(scheme_intern_symbol("quote"), l);
|
|
|
|
a[0] = l;
|
|
a[1] = scheme_false;
|
|
|
|
scheme_dynamic_require(2, a);
|
|
|
|
MZ_GC_UNREG();
|
|
return 0;
|
|
}
|
|
|
|
int main(int argc, char *argv[]) {
|
|
return scheme_main_setup(1, run_bc, argc, argv);
|
|
}
|