Compile C to Not Gates

c2fj is a unique compiler that can convert C code into series of NOT operations known as FlipJump ops. The process involves compiling C to RiscV elf using picolibc, then transforming it into fj files, fjm, and eventually running it. Controversially, the compiler optimizes space by condensing each riscv op into a set of fj ops, allowing it to handle large codebases efficiently. The final step utilizes the FlipJump package to interpret the compiled fjm file. Additionally, memory is loaded via mem.fj, and jmp.fj serves as a jump table for easy navigation. The project also offers supported syscalls like exit, sbrk, _getc, and _putc.

https://github.com/tomhea/c2fj

To top