diff options
author | Pixel <> | 2001-04-15 01:15:37 +0000 |
---|---|---|
committer | Pixel <> | 2001-04-15 01:15:37 +0000 |
commit | df05ffca736e4090a6b2acce53eafb72d85b87c9 (patch) | |
tree | 9daf5318f319181524240b2120abdf4df6e7663d /src/compilo.c | |
parent | 1d2c4bd4e380395c68151d40239d1539d39fdd91 (diff) |
Divers
Diffstat (limited to 'src/compilo.c')
-rw-r--r-- | src/compilo.c | 18 |
1 files changed, 10 insertions, 8 deletions
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 <stdio.h> #include <string.h> #include <stdlib.h> +#include <signal.h> #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(); |