Open Hardware & RISC-V

Borland Reborn recovers DOS compiler source code from shipped binaries

Key Takeaway

The project reconstructs readable, commented C and assembly sources for Borland's DOS compilers from the original executables, rebuilding BCC.EXE byte-for-byte with Borland's own tools.

Summary

Abedegno has published Borland Reborn, a project that recovers the source code of Borland's DOS compilers from the binaries Borland originally shipped. The first target is BCC.EXE from Borland C++ 2.0, and the recovered C and assembly sources rebuild that program byte for byte using the original Borland toolchain. The sources are written to be readable, using real names and carrying comments on the files.

The build process runs under DOS: it compiles the recovered sources, checks each function against the original binary, and then links a new BCC.EXE. A second build mode allows the compiler itself to be modified, and that variant is validated by running compilations with both the original and the rebuilt compiler and comparing the output. More Borland and Turbo versions are planned, with the work hosted on GitHub.

How the Borland compiler sources were recovered

  • Recovery method: The source code is reconstructed from the programs Borland shipped rather than from leaked or archived source, producing C and assembly that rebuild the original executables exactly.
  • Byte-for-byte validation: The recovered sources for BCC.EXE from Borland C++ 2.0 rebuild the program byte for byte when compiled with the original Borland tools.
  • Per-function checking: The build compiles the sources under DOS and verifies each function against the corresponding code in the original binary before linking a new BCC.EXE.
  • Modifiable variant: A second build path lets developers change the compiler, and correctness is checked by compiling with both the original and modified compilers and comparing the resulting output.
  • Readable sources: The recovered files use real names and include comments, making the reconstructed code usable for study rather than only for reproduction.

Why it matters

Borland's DOS compilers are a foundational part of early PC software history, and having readable, rebuildable sources makes that toolchain available for study and preservation instead of remaining opaque binaries. For retrocomputing and software-archaeology work, the per-function and output-comparison checks give a concrete correctness standard that other binary-to-source recovery efforts can follow. The planned expansion to more Borland and Turbo versions could eventually cover a wider slice of the DOS development toolchain.

Original reference: blog.adafruit.com →