Borland C++ 2.0 Compiler Source Reconstructed Byte-for-Byte With AI
Using the Claude Code-based Exhume tool, developer Abedegno reconstructed Borland C++ 2.0's 1991 compiler source so rebuilt binaries match byte-for-byte.
Thirty-five years after Borland shipped Borland C++ 2.0 for DOS, the closed-source 1991 compiler toolchain has been reconstructed back into readable source code that compiles to byte-identical binaries. As reported by Hackaday, a developer known as Abedegno achieved the recreation by combining classic reverse-engineering verification with Exhume, a custom decompilation assistant built on Claude Code.
Byte-Perfect Reconstruction From 1991 Binaries
Borland C++ 2.0 succeeded Turbo C++ and became a defining professional IDE and toolchain for DOS-era C and C++ developers. Because it was a commercial flagship product, Borland never released the compiler's source code. Until now, anyone studying how the toolchain generated code or maintaining legacy DOS binaries had to treat the executables as black boxes.
Abedegno's project claims a byte-perfect reconstruction: when compiled, the reconstructed source reproduces binaries identical to the original 1991 release toolchain. In reverse engineering, matching output byte-for-byte is a far stricter bar than building a functional work-alike. A work-alike only needs to pass test suites; a matching decompilation must align register allocation, control flow, data layout, and compiler quirks closely enough that the resulting machine code matches the historical binary hash for hash.
How Exhume and Claude Code Changed the Grind
Historically, matching decompilations—best known from retro console game preservation—required months or years of painstaking manual assembly reading, trial-and-error C rewrites, and constant binary diffing. Abedegno documented the reconstruction workflow and leaned on Exhume, a tool built around Claude Code, to accelerate the loop of decompiling functions and correlating candidate source against the original toolchain binaries.
AI-assisted reverse engineering fits this problem unusually well because binary matching provides an objective, deterministic oracle. Unlike open-ended code generation where subtle hallucinations can slip past review, every reconstructed function in a matching decompilation is immediately verified against the target binary. If an instruction sequence or stack offset diverges by a single byte, the diff exposes it immediately, letting the human engineer and the AI iterate until the output converges.
Historical Context: Pre-Standard C++ and Early C89
Reconstructing Borland C++ 2.0 also preserves a pivotal snapshot in programming language history. When version 2.0 arrived in 1991:
- C had only recently been standardized as ANSI C / C89, meaning compilers were still bridging older K&R habits with strict prototypes and function-top variable declarations.
- C++ had no official ISO standard at all—C++98 was still seven years away, so commercial vendors like Borland effectively defined everyday C++ idioms, templates, and object models in the wild.
- DOS hardware constraints shaped every design choice, from segmented memory models to tight disk and RAM budgets.
Having inspectable source code for a compiler from that transitional period is directly valuable for retrocomputing preservationists, DOS software archivists, and compiler engineers curious about how early commercial toolchains balanced compilation speed with code generation quality on resource-constrained x86 hardware.
Compiler Trust, Audits, and What Comes Next
The release also sparked a broader discussion among systems programmers about Ken Thompson's classic 1984 "Reflections on Trusting Trust" lecture—the observation that a compromised compiler binary can inject hidden backdoors into programs it builds, including future versions of itself. Reconstructing closed-source compilers to byte-identical source does not automatically guarantee the absence of subtle logic bugs without careful human reading, yet it turns opaque historical executables into auditable text.
More broadly, the Borland C++ 2.0 milestone signals how quickly AI-assisted tooling like Exhume is lowering the barrier for legacy software preservation. Commercial compilers, embedded firmware, and industrial toolchains whose original source archives were lost decades ago are suddenly within reach of small teams and independent researchers—provided they have the original binaries and the patience to verify every last byte.
// comments (0)