Why convert FJ to C?
People see the c2fj project and assume conversion works both ways to get .c from a .fj file. But FlipJump is a low-level target where the original high-level structure is gone once compiled, so decompiling back to meaningful C is not feasible. The practical route is authoring C and compiling it down to FlipJump.
How to convert FJ to C
c2fj (compile C to FlipJump)
Write your program in .c and use tomhea's c2fj to compile it into FlipJump - this replaces the missing reverse path by working from C in the first place.
Read and rewrite by hand
Open the .fj file in a text editor and manually re-implement its logic in C; there is no automated .fj-to-.c translator.
About these formats
A .fj file is source code written in FlipJump, an esoteric one-instruction programming language whose only operation flips a bit and then jumps to an address. The file is plain text, so any…
Open .FJ details →A .c file is C source code - plain text that a programmer writes, which a compiler turns into a runnable program. Open it for reading in any text editor (Notepad++, VS Code, Vim). To…
Open .C details →Quality & what to watch
- No decompiler exists that produces
.cfrom.fj; the conversion is one-directional (C to FlipJump only). - Even a manual rewrite is hard because FlipJump has a single flip-then-jump instruction with none of C's structure.
- c2fj solves the opposite problem, so it cannot recover C from an existing
.fjfile.
Frequently asked questions
Can I decompile a .fj file to C?
What does c2fj do then?
.fj/.fjm) - the reverse of what you are asking for.How can I get C code that behaves like a .fj program?
.fj logic and rewrite it in C by hand, or start from C and compile down with c2fj.