deniz.in

Markets

Weather

Loading weather

· via Hacker News – Front Page (native)

Borland's 1991 DOS compilers rebuilt byte-for-byte from their own binaries

The borland-reborn project recovered the source behind Borland C++ 2.0's 22 DOS executables, and that source recompiles into binaries identical to the originals — with readable names and commentary added.

Borland's 1991 DOS compilers rebuilt byte-for-byte from their own binaries

A 1991 compiler suite, reproduced exactly

A GitHub repository published under the account abedegno, named borland-reborn, has reconstructed the source code of Borland's classic DOS compilers from the shipped executables themselves — and the recovered C and assembly, when compiled with the original Borland toolchain, reproduces each program bit for bit. The project reached Hacker News's front page in late November 2026.

The first suite to be completed is Borland C++ 2.0, from 1991. According to the repository, all 22 of its executables now rebuild identically: the compiler BCC.EXE, the preprocessor CPP, the linker TLINK, the assembler TASM, the librarian TLIB, MAKE, the protected-mode tooling (TKERNEL, BCCX, TLINKX and TASMX), and the various utilities. The collection also takes in the run-time library modules and a native port of the compiler. Further Borland and Turbo releases are planned as additional directories, and the setup script already accepts a Turbo C 2.01 archive even though only Borland C++ 2.0 is finished.

Recovered, then made readable

What separates the work from ordinary decompilation is a deliberate readability pass. The project says the recovered code carries descriptive names for identifiers and structure fields, file-by-file commentary, and notes describing both the compiler's intended behaviour and its bugs. The result is meant to be studied, not merely to compile.

The method is written up in the project's how-it-works document: work out the precise compiler build and command-line switches behind each binary, match functions one by one, verify everything that function matching alone cannot observe, link the full program with TLINK, and only then apply the readability pass — with every stage held to the same byte-for-byte gate.

Reproducing it at home

The repository does not redistribute Borland's software, so anyone wanting to check the claims must first obtain the original archives; the setup guide points to WinWorld as the source. From there the process is scripted: a Python helper unpacks and wires up the toolchains, dosbox-x supplies the DOS environment, and Node is also required. The final verification command compiles all 298 recovered source files under DOS, checks every function against the original binary, verifies every relocation and symbol name, and links a new BCC.EXE identical to Borland's own.

A second build for modifying the compiler

Beyond the faithful rebuild there is a modding build, intended for actually changing the compiler. It links the same sources but leaves layout decisions to TLINK, so individual functions can grow or shrink, new data items can be inserted between existing ones, and additional source files can be introduced. The project validated this configuration by running 1836 compiles with both the original and the rebuilt compiler — Borland's own example programs plus old GCC and cfront test suites among them — and comparing every resulting output. A tracing emulator logs which data words the compiler treats as addresses and which code paths the tests actually exercise; the documented coverage figure is 83%.

Licence and status

The project's own scripts and documentation are MIT-licensed. The recovered sources are treated differently: they derive from Borland's copyrighted programs, and the repository claims no rights over them, offering them for study and preservation only. Corrections to names, comments and findings are welcomed from contributors.

Why it matters

Borland's DOS compilers were among the most widely used development tools of the early 1990s, and their source has never been published. This project is the closest thing to having it — and, unusually, the claim is verifiable. Byte-identical reconstruction is a far stronger guarantee than typical decompiler output, which approximates a program's logic but rarely its exact bytes; here every function, relocation and symbol is checked, and the whole thing is gated by a rebuild that must match Borland's binary exactly.

It also lowers the barrier to genuinely working with the code. Because the sources are readable and a modding build exists with a flexible layout, a historically important compiler can now be studied, annotated, fixed and extended by anyone willing to track down the original archives. And the careful legal posture — no rights claimed over the recovered material, originals never redistributed — offers a template for other software-preservation efforts that want to stay on the right side of copyright while still putting recovered source in public view.

  • #borland
  • #reverse-engineering
  • #compilers
  • #dos
  • #retro-computing

Related posts