Commit Graph

6 Commits

Author SHA1 Message Date
Aryadev Chavali
3c39df6c95 Implement SIZE_FMT and vec_append_fmt
SIZE_FMT gets the size of a cstr with the given sprintf formatted
string and arguments using `snprintf`.

vec_append_fmt formats a cstr with the given sprintf arguments then
appends it to the given vector.

This simplifies a little bit of the wordy implementation of the
assembler.
2024-12-24 23:08:52 +00:00
Aryadev Chavali
70cfeac995 Move system calling code to the end 2024-12-24 22:57:28 +00:00
Aryadev Chavali
7686c1043c Refactor assembler to use vec_t instead of buffer
Clearer, precise and no double pointers.
2024-12-19 08:45:47 +00:00
Aryadev Chavali
87fa534a7a asm_write_{init, exit} when asm_translate_nodes 2024-12-03 04:22:59 +00:00
Aryadev Chavali
6ad3e61a2b Fix errors due to no loops 2024-12-03 04:13:40 +00:00
Aryadev Chavali
a135262cd8 Wrote an assembler (transpiles brainfuck into assembly code)
Provides:
+ Transpilation from brainfuck code into intel style assembly
+ functions to assemble and link code
2024-12-03 03:38:01 +00:00