← All stories
● Covered by 1 source · 1 reportLow impact1 neutral

Borland DOS Compilers Rebuilt from Binaries with Recovered Source Code

🔄 Updated 2d ago
New to BrevFeed? We gather this story from every outlet covering it into one summary — ranked by real-world impact, not just the latest headline — so you never miss what matters. What is BrevFeed? →

Key points

  • Source code recovered from Borland DOS compiler executables.
  • Rebuilds executables byte-for-byte using original toolchain.
  • Source code made readable with names, comments, and documentation.
  • Supports modifying the compiler with a dedicated build process.
  • Verification includes extensive test compiles and byte comparisons.

Source Code Recovery and Rebuilding

A new repository has been released that recovers the source code for classic Borland DOS compilers directly from their published executables. This process allows the recovered C and assembly code to rebuild each executable, such as BCC.EXE, byte for byte, matching the original Borland versions using the original Borland toolchain.

Enhancing Readability and Documentation

Beyond mere recovery, the project focuses on making the source code readable. This includes adding real names for variables and functions, naming record fields, providing comments on every file, and including notes detailing compiler behavior and identified issues. Future plans involve adding more Borland and Turbo versions to the repository.

Setup and Verification Process

Users need to provide the original Borland programs, which are not included in the repository. The setup involves cloning the repository, downloading Borland C++ 2.0 and Turbo C 2.01, installing Python packages and DOSBox-X, and then running scripts to prepare, compile, and verify the rebuilt executables. The verification process compiles 298 sources, checks every function byte for byte against the original, and verifies relocations and names to ensure an identical output.

Modding and Testing Capabilities

The project includes a 'modding build' that allows for changes to the compiler. This build links sources with a layout chosen by TLINK, enabling functions to grow or shrink, new data to be inserted, and new source files to be added. This modding build is tested by running 1836 compiles using Borland's own examples and old GCC/cfront tests, comparing outputs, and tracing code and data usage with an emulator, achieving 83% coverage.

Methodology

The recovery method involves identifying the exact compiler and switches used, matching each function, verifying aspects that cannot be directly matched, linking the entire program with TLINK, and then performing a readability pass. All steps are validated by the same byte-for-byte gate to ensure accuracy and fidelity to the original binaries.

✨ This summary was generated by AI from the outlets' reporting listed below. It is not independently verified and may contain errors — check the original sources. How BrevFeed works →

The daily brief

One email each morning: the day's tech stories, clustered across outlets and summarized. No account needed.

One email a day. Unsubscribe in one click, any time.

Today's brief

Spend a few minutes, get the whole day. Every topic's top stories in one hands-free rundown — listen, watch, or read the transcript.

~4 min · 3 stories · Dec 01

▶ Play today's brief Listen on Spotify

New every morning, and the back catalogue is archived by date.

Reporting from

A new repository reconstructs the source code of classic Borland DOS compilers from their original executables, allowing byte-for-byte identical rebuilds using the original Borland toolchain. The project aims to make this recovered source code readable with added names, comments, and documentation, and supports modifications to the compiler.