Borland's DOS compilers, rebuilt from their own binaries github.com · 54 points ...

@best

Borland's DOS compilers, rebuilt from their own binaries github.com · 54 points · 10 comments · HN thread

TL;DR The repository claims to recover the source code of Borland C++ 2.0 (1991) from its published DOS executables, so that the recovered C and assembly rebuild all 22 executables byte for byte with the original toolchain, and it adds comments and readable names. The project provides a build and verification gate but requires the user to supply the original Borland programs, which are not included. Commenters are skeptical about whether the readable code reflects the original source, and some say the work is AI-generated.

  • Covers Borland C++ 2.0 (1991): BCC.EXE, CPP, TLINK, TASM, TLIB, MAKE, protected-mode tools and utilities, 22 executables in all, plus run-time library modules and a native port of the compiler.
  • Claims every program rebuilds byte-identical; the gate compiles 298 sources in DOS, checks each function against the original, and links a new BCC.EXE identical to Borland's.
  • Readability pass adds real names, named record fields, comments on every file, and notes on compiler behaviour and bugs.
  • A modding build links the sources with a flexible layout and is tested with 1836 compiles against Borland's compiler; tracing coverage is reported at 83%.
  • Plans to add Turbo C 2.01 and other Borland/Turbo versions as further top-level directories.
  • Original Borland programs are not included; users must download them from WinWorld and supply them via setup scripts. Project scripts are MIT-licensed, recovered sources are provided for study and preservation with no rights claimed.

Discussion The thread is small and mixed. Some commenters find the project useful for preservation or related reverse-engineering work, and one points to a similar tool for MSVC. The most-discussed thread questions the value of the output: whether readable C recovered from binaries is better than raw decompiler output, and whether the 'rebuilt' label reflects AI reconstruction. A few comments are nostalgic or wish for similar tools, and the tone is more skeptical than enthusiastic.

  • Skeptical that AI-reconstructed code resembles the original source (some): AshamedCaptain argues that getting compilable C is easy while readable C is the hard part, and that AI decompilers are not a real improvement. Byte-identical output does not mean the code is the original source, and the result may distract anyone trying to reconstruct the real code.
  • Questions the purpose of AI-generated decompilation projects (some): humblefly asks why such a project is worth doing, noting that its readable form is better than raw decompiler output but questioning what the token cost buys. He suspects AI projects are partly social proof of money spent.
  • Useful for preservation and related reverse engineering (a few): noahbp says the work will help projects decompiling binaries from these compilers and mentions a related tool for Microsoft Visual C++ register allocation analysis.
  • AI involvement is the key fact to note (a few): Waraqa clarifies that 'rebuilt' means reverse-engineered and reconstructed by AI, and smallerfish says the word 'own' is a sign of AI-written text.
  • AI projects are mainly personal fun (a few): markus_zhang says AI reverse-engineering projects are mostly for individual enjoyment, which is acceptable.
  • Nostalgia and wishes for other tools (a few): abecedarius would like to run it for nostalgia but no longer has the software, while squarefoot wishes for a Turbo Zig IDE and compiler for microcontrollers and codazoda shares a Borland-inspired web editor.

Links from the comments

#Borland #DOS #decompilation #reverseEngineering #AI #compilers