summaryrefslogtreecommitdiff
path: root/masm/masm.h
diff options
context:
space:
mode:
Diffstat (limited to 'masm/masm.h')
-rw-r--r--masm/masm.h45
1 files changed, 45 insertions, 0 deletions
diff --git a/masm/masm.h b/masm/masm.h
new file mode 100644
index 0000000..75a63f8
--- /dev/null
+++ b/masm/masm.h
@@ -0,0 +1,45 @@
+/* Copyright (c) 2024 Freya Murphy */
+
+#ifndef __MASM_H__
+#define __MASM_H__
+
+// isa to asemble for
+enum isa {
+ ISA_MIPS1, // a.k.a mipsR2000
+ ISA_MIPS32R2,
+ ISA_MIPS32R6,
+};
+
+// abi to mark output object
+enum abi {
+ ABI_O32, // mips o32 abi
+ ABI_NONE, // no flag output
+};
+
+// format for the object file
+enum format {
+ FORMAT_ELF32,
+};
+
+// defines arguments
+struct arguments {
+ // files to read from and
+ // write to
+ char *in_file;
+ char *out_file;
+
+ // if undefined symbols should
+ // be treated as extern
+ bool extern_undefined;
+
+ // isa to assemble for
+ enum isa isa;
+
+ // abi to mark object
+ enum abi abi;
+
+ // format to output
+ enum format format;
+};
+
+#endif /* __ASM_H__ */