Today I completed my compiler from C to FlipJump. It takes C files, and compiles them into flipjump. I finished testing it all today, and it works! My key interest in this project is to stretch what we know of computing and to prove that anything can be done even with minimal power.
I appreciate you reading my announcement, and be happy to answer questions.
More links:
- The flipjump language: https://github.com/tomhea/flip-jump https://esolangs.org/wiki/FlipJump
- c2fj python package https://pypi.org/project/c2fj/
If I haven't understood this right, then I still do not follow how if statement works with flipjump.
The power of flipjump results in self modifying code. If I jump to a address that have the [flip 0, jump 0x1000], then I'll get to 0x1000 afterwards, right? But if I flip some specific bit in this instruction before jumping to it, it will become [flip 0, jump 0x1080]. You can call this instruction "memory bit", and the part of jumping to it and resulting in one of two possible addresses 0x1000/0x1040 based on a specific bit in it - "read the memory bit". The action is reading as you get to different place based on the value stored in this instruction. This "read" can also be seen as an "if". How you write then? For example writing "1" whould be doing a "read", and in the "read 0" case - do a flip to this address, and in the "read 1" case don't flip this memory address bit.
>> But if I flip some specific bit in this instruction before jumping to it
Isn't the 'if' really happening in the above phrase? The rest of it is a modified jump address based on the above 'if' and just jumps to the modified address.
Now if I understand this correctly, how to do the above 'if', i.e., flip the address bit or not based on some condition?
May be it would begin from some bit read from IO which modifies an address. I saw that memory-mapped IO is used.