aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/src/main.c b/src/main.c
index 8f9b095..fec258d 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1,4 +1,5 @@
#include <stdint.h>
+#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <utils/file.h>
@@ -56,17 +57,17 @@ int compileFasm(const char *const filePath) {
}
pushToSourceCode(&sourceCode, code);
- printf("----lexing:\n");
+ // printf("----lexing:\n");
FasmLines *lines;
if ((lines = fasmLexer(&sourceCode)) == NULL) {
goto RETURN_ERROR;
}
- for (size_t i = 0; i < sourceCode.size; ++i) {
- fasmLinesPrint(lines[i]);
- }
+ // for (size_t i = 0; i < sourceCode.size; ++i) {
+ // fasmLinesPrint(lines[i]);
+ // }
- printf("----linking:\n");
+ // printf("----linking:\n");
FasmLinkedLines linkedLines = fasmLinker(lines, &sourceCode);
@@ -74,10 +75,17 @@ int compileFasm(const char *const filePath) {
goto RETURN_LINKED_ERROR;
}
- fasmLinkedLinesPrint(linkedLines);
+ // fasmLinkedLinesPrint(linkedLines);
+
+ // printf("----bytecode:\n");
ByteCode bytecode = fasmCodeGenerator(&linkedLines);
+ // for (size_t i = 0; i < bytecode.code_size; ++i) {
+ // printf("0x%.2x ", bytecode.code[i]);
+ //}
+ // printf("\n");
+
deleteByteCodeInners(bytecode);
fasmLinkedLinesDeleteInner(linkedLines);