diff options
Diffstat (limited to 'src/main.c')
| -rw-r--r-- | src/main.c | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -5,8 +5,8 @@ #include "diag.h" #include "sema.h" #include "lexer.h" -#include "nasm.h" #include "parser.h" +#include "codegen.h" int main(int argc, char** argv) { @@ -18,9 +18,9 @@ int main(int argc, char** argv) if (result == PARSE_ERROR) return 1; - if (args.target != ASSEMBLER_NASM) + if (args.target == ASSEMBLER_MASM) { - report_error_message("only the nasm target is supported"); + report_error_message("the masm target is not implemented yet"); return 1; } @@ -62,7 +62,10 @@ int main(int argc, char** argv) } } - generate_nasm(&program, out); + if (args.target == ASSEMBLER_FASM) + generate_fasm(&program, out); + else + generate_nasm(&program, out); if (out != stdout) fclose(out); |
