From e3d2e31377030e84066bed4bbc04bf6c56206305 Mon Sep 17 00:00:00 2001 From: Freya Murphy Date: Wed, 11 Sep 2024 12:06:09 -0400 Subject: refactor --- masm/main.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'masm/main.c') diff --git a/masm/main.c b/masm/main.c index be156d8..760e4fa 100644 --- a/masm/main.c +++ b/masm/main.c @@ -3,27 +3,24 @@ #include #include "asm.h" -#include "mips.h" void help(void) { printf("usage: masm [options] source.asm\n\n"); printf("options:\n"); printf("\t-h\t\tprints this help message\n"); - printf("\t-i isa\t\tselect a ISA to assemble to (mips32)\n"); printf("\t-o output\tselect a output file destination\n"); } int main(int argc, char **argv) { struct assembler_arguments args = { - .isa = ISA_MIPS32, .in_file = NULL, .out_file = NULL, }; int c; - while ((c = getopt(argc, argv, "ho:i:")) != 1) { + while ((c = getopt(argc, argv, "ho:")) != 1) { switch(c) { case 'h': help(); @@ -31,14 +28,6 @@ int main(int argc, char **argv) { case 'o': args.out_file = optarg; break; - case 'i': - if (strcmp(optarg, "mips32") == 0) { - args.isa = ISA_MIPS32; - } else { - ERROR("invalid isa '%s'", optarg); - return M_ERROR; - } - break; case '?': return M_ERROR; default: -- cgit v1.2.3-freya