From df05ffca736e4090a6b2acce53eafb72d85b87c9 Mon Sep 17 00:00:00 2001 From: Pixel <> Date: Sun, 15 Apr 2001 01:15:37 +0000 Subject: Divers --- src/compilo.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/compilo.c b/src/compilo.c index ccacb32..f7440fb 100644 --- a/src/compilo.c +++ b/src/compilo.c @@ -1,6 +1,7 @@ #include #include #include +#include #include "config.h" #include "exceptions.h" #include "meta.h" @@ -8,6 +9,8 @@ #include "hash.h" #include "assembler.h" +typedef void (*sighandler_t)(int); + void invite(void) { fprintf(stderr, _("Assembler\n\n")); } @@ -39,20 +42,19 @@ void flush_all(void) { meta_flush(); } +void segfaulthand(int i) { + exception(1, _("Signal received: segfault")); +} + int main(void) { invite(); + +/* signal(SIGSEGV, segfaulthand);*/ fprintf(stderr, _("\nPerforming initialisation...\n\n")); init_all(); - parse_line("MoV R12, R31 ; petit test."); - asm_eol(); - - parse_line("MOV R12, Label[R23]"); - asm_eol(); - - parse_line("MOV R31, [Label + 12 + R12]"); - asm_eol(); + process_file("progtest.asm"); fprintf(stderr, _("\nPerforming shutdown...\n\n")); flush_all(); -- cgit v1.2.3