diff options
author | Pixel <> | 2001-04-16 14:25:48 +0000 |
---|---|---|
committer | Pixel <> | 2001-04-16 14:25:48 +0000 |
commit | 47f363829678a02111423cd5d374e6739d8ea500 (patch) | |
tree | 5c288a8902492e1a91d87ba4ab1cca658e39cbfa /src/compilo.c | |
parent | 27f796ab6a9f455bbd2a1c85088db5304cece75a (diff) |
Linker + bugfixes
Diffstat (limited to 'src/compilo.c')
-rw-r--r-- | src/compilo.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/compilo.c b/src/compilo.c index 883bd81..61ea761 100644 --- a/src/compilo.c +++ b/src/compilo.c @@ -12,7 +12,12 @@ typedef void (*sighandler_t)(int); void invite(void) { - fprintf(stderr, _("Assembler\n\n")); + fprintf(stderr, _("Assembler v1.0\n\n")); +} + +void usage(void) { + fprintf(stderr, _("Usage: compilo program.asm objet.out\n")); + exit(0); } void init_all(void) { @@ -46,15 +51,17 @@ void segfaulthand(int i) { exception(1, _("Signal received: segfault")); } -int main(void) { +int main(int argc, char ** argv) { invite(); /* signal(SIGSEGV, segfaulthand); */ + + if (argc != 3) usage(); fprintf(stderr, _("\nPerforming initialisation...\n\n")); init_all(); - - assemble_file("progtest.asm", "progtest.o"); + + assemble_file(argv[1], argv[2]); fprintf(stderr, _("\nPerforming shutdown...\n\n")); flush_all(); |