diff options
Diffstat (limited to 'asm/src/main.c')
| -rw-r--r-- | asm/src/main.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/asm/src/main.c b/asm/src/main.c new file mode 100644 index 0000000..2d25274 --- /dev/null +++ b/asm/src/main.c @@ -0,0 +1,24 @@ +#include <stdlib.h> +#include <stdio.h> + +#include <lcq/pit.h> + +#include <lcq/asm/library.h> + +int main(int argc, char **argv) { + i64 sz = 256 * 1024 * 1024; + u8 *buf = malloc((size_t) sz); + pit_runtime *rt = pit_runtime_new(buf, sz); + rt->fuel = 10000000; + pit_install_library_essential(rt); + pit_install_library_io(rt); + pit_install_library_plist(rt); + pit_install_library_alist(rt); + pit_install_library_bytestring(rt); + asm_install_library_elf(rt); + if (argc < 2) { + pit_repl(rt); + } else { + pit_load_file(rt, argv[1]); + } +} |
