summaryrefslogtreecommitdiff
path: root/nqasm.c
diff options
context:
space:
mode:
Diffstat (limited to 'nqasm.c')
-rw-r--r--nqasm.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/nqasm.c b/nqasm.c
new file mode 100644
index 0000000..a42f8f4
--- /dev/null
+++ b/nqasm.c
@@ -0,0 +1,20 @@
+#include <stdio.h>
+
+#include "mnemonics.h"
+#include "nqasm.h"
+
+#include "lexer.h"
+#include "parser.h"
+
+void add_instruction(const struct instruction *i)
+{
+ const struct mnemonic *m = &mnemonics[i->mnem];
+ printf("%04x\n", m->bits);
+}
+
+int main(int argc, char **argv)
+{
+ yyparse();
+ return 0;
+}
+