This is going to be very helpful for any project to decompile binaries that were compiled with these compilers.
I'm working on something similar though shot of a full decompilation for Microsoft Visual C++, to trace and report the knobs to tune in the internal register allocation algorithm (among other things) to make reversing and decompiling binaries that were compiled with MSVC a much easier task: https://github.com/NoahBPeterson/c2scope
I've been building a web based editor inspired by the Borland Turbo Pascal/Basic editors. It uses an optional GitHub token to save files directly to your repo. You can try it here:
Impressive. But the critical missing feature is a step in the process that transforms the resulting source into readable source, using transforms that are provably identical in behavior.
The code is quite readable and well documented. Look at, for example, the register allocator. It’s quite readable what’s going on, and the comment at the top of each file describes the general algorithm.
I'd love to run this for the nostalgia value, and I did buy the original software but left it behind long ago. Oh, well. ("You need the original Borland programs" -- very reasonably.)
I grant you that it's a thing you can do with agents, and it's impressive that it works, but once the tokens are spent, what does anyone get out of it? I guess I wonder if AI projects are becoming a bit of a "social proof of money spent".
That's just wrong usage of agents in this project, many models are capable of reconstructing idiomatic and really close to the original source code with a proper tooling and prompting (I mean, you need to understand what you're doing to get such result). It's sad to see this level of reconstruction with all the resources we have available.
if i have 20 versions of one function to try, i can test all 20 from one script, no DOS. in the Ultima 7 test, all 922 C compiles matched old Borland. ugly code yes, but this part i would use :)
Is it even better than raw decompiler output? Frankly, I have been saying this forever but always criticized: getting C output that compiles has always been the easy part, getting stuff that is readable is actually where the problem is, and franky these "AI decompilers" are hardly an improvement so far.
But people act as if "well we got something that compiles down to the same binary, this must be the actual C source!" Welp. It couldn't be more different than the original source. In fact, it's probably even distracting if your goal is to reconstruct the original source. This is just AI slop in a form that you can't even easily recognize.
Not to mention the licensing aspect of all of this. One should be wary of Watcom because of its terrible license, even though it is technically Open Source.If as a consequence Watcom is kind of a minefield, I don't even know how to start describing this. The trenches at Verdun?
Since we live in the age of vibe recompilation, reverse engineering etc where everything seems possible, let me drop a wish for a "Turbo Zig" CLI IDE + compiler that covers most well known microcontrollers.
I'm working on something similar though shot of a full decompilation for Microsoft Visual C++, to trace and report the knobs to tune in the internal register allocation algorithm (among other things) to make reversing and decompiling binaries that were compiled with MSVC a much easier task: https://github.com/NoahBPeterson/c2scope
I'm quite far with Microsoft C 5.1, I wonder how much similarity there is, if any.
Short description, adjective more description
https://codazoda.github.io/blue
https://github.com/abedegno/borland-reborn/blob/main/docs/HO...
(the original has more detail). Whether this step succeeded is a different question.# 1. download Borland C++ 2.0 and Turbo C 2.01 from WinWorld (links in docs/SETUP.md)
Section 3 here:
https://github.com/abedegno/borland-reborn/blob/main/docs/SE...
(It’s up to your conscience whether it lets you. I have not tried the downloads).
But people act as if "well we got something that compiles down to the same binary, this must be the actual C source!" Welp. It couldn't be more different than the original source. In fact, it's probably even distracting if your goal is to reconstruct the original source. This is just AI slop in a form that you can't even easily recognize.
Not to mention the licensing aspect of all of this. One should be wary of Watcom because of its terrible license, even though it is technically Open Source.If as a consequence Watcom is kind of a minefield, I don't even know how to start describing this. The trenches at Verdun?