diff options
author | Aryadev Chavali <aryadev@aryadevchavali.com> | 2024-12-03 03:38:01 +0000 |
---|---|---|
committer | Aryadev Chavali <aryadev@aryadevchavali.com> | 2024-12-03 03:38:01 +0000 |
commit | a135262cd8eed85df769a7dbace73a886af7d6df (patch) | |
tree | 07f185c09f7c3014c32a4bb3155c2339638f024a /assembler.h | |
parent | 14ee1d3f02f8b1c569e06102548aa5b41cae23cd (diff) | |
download | obf-a135262cd8eed85df769a7dbace73a886af7d6df.tar.gz obf-a135262cd8eed85df769a7dbace73a886af7d6df.tar.bz2 obf-a135262cd8eed85df769a7dbace73a886af7d6df.zip |
Wrote an assembler (transpiles brainfuck into assembly code)
Provides:
+ Transpilation from brainfuck code into intel style assembly
+ functions to assemble and link code
Diffstat (limited to 'assembler.h')
-rw-r--r-- | assembler.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/assembler.h b/assembler.h new file mode 100644 index 0000000..f311a96 --- /dev/null +++ b/assembler.h @@ -0,0 +1,17 @@ +#ifndef ASSEMBLER_H +#define ASSEMBLER_H + +#include "./lib.h" +#include "./parser.h" + +void asm_setup_buffer(buffer_t **asm_buffer, const char *outname); +void asm_translate_nodes(buffer_t **asm_buffer, struct PResult nodes, + const char *src_name); + +void asm_write(buffer_t **asm_buffer); +int asm_assemble(const char *srcname, const char *objname); +int asm_link(const char *objname, const char *outname); +int asm_compile(buffer_t **asm_buffer, const char *objname, + const char *outname); + +#endif |