Borland's DOS compilers, rebuilt from their own binaries
Borland Reborn recovered the source code for Borland C++ 2.0 from 1991, rebuilding twenty-two DOS tools byte for byte across 298 verified source files.
By Dillip Chowdary • Nov 29, 2026 • Source: github.com

At a glance
- Product
- Borland C++ 2.0 and compiler tools
- Version
- 1991 release
- Executable count
- 22 executables recovered
- Source file count
- 298 source files compiled
- Test suite count
- 1836 test compilations
- Code coverage
- 83% compiler code exercised
In this post
Open-source preservation project Borland Reborn launched an initiative to recover classic Borland DOS compiler source code directly from published executables, according to github.com's report. The project extracts C and assembly code from original binary distributions and rebuilds each executable byte for byte using the original Borland toolchains. Beyond basic decompilation, the effort adds readable variable names, named record fields, per-file commentary, and technical notes documenting compiler behavior and bugs.
This breakdown examines the recovery process, toolchain requirements, modification workflows, and verification harnesses across classic DOS developer environments. It is aimed at systems programmers, reverse engineers, vintage computing enthusiasts, and software preservationists tracking compiler history. The initial release focuses on Borland C++ 2.0 from 1991, with plans to expand across additional historical releases.
01Borland C++ 2.0 toolchain recovery
The project's initial milestone targets Borland C++ 2.0, released in 1991, completely reconstructing the compiler and its companion development tools. The recovered suite spans twenty-two executables, including BCC.EXE, CPP, TLINK, TASM, TLIB, and MAKE, alongside protected-mode utilities such as TKERNEL, BCCX, TLINKX, and TASMX. The tree also includes runtime library modules and a native port of the compiler, with every component documented in the bc20 directory.
| Directory | Product | Status |
|---|---|---|
| bc20/ | Borland C++ 2.0 (1991) | 22 executables rebuild byte-identical |
| tc201/ | Turbo C 2.01 | Planned top-level addition |
The repository is structured so future compiler editions, such as Turbo C 2.01, can be incorporated as distinct top-level directories. All compiler editions share central automation scripts and the specialized Exhume build tools. Every program in the current release reproduces its original binary image without a single byte discrepancy.
02Environment configuration and build steps
Building the compilers requires original, user-provided Borland installation archives rather than bundled proprietary binaries. Setup instructions guide users through acquiring media images, setting up emulation layers, running preparation scripts, and executing verification gates.
- Clone repository Clone the tree with submodules using git clone --recurse-submodules https://github.com/abedegno/borland-reborn and enter the root directory.
- Download toolchains Obtain Borland C++ 2.0 and Turbo C 2.01 archive packages from WinWorld per setup documentation.
- Execute toolchain setup Run python3 scripts/setup-toolchains.py pointing to the downloaded 7z archive packages.
- Install environment dependencies Create a Python virtual environment, install requirements from exhume/tools/requirements.txt, and configure DOSBox-X and Node.
- Generate link inputs Switch to bc20/bcc and run prepare.py using the Python virtual environment binary.
- Execute gate check Run exhume/tools/gate.py check --all to compile, verify, and link all sources.
The final gate check command compiles all 298 source files inside the DOS environment, inspecting every routine against the original executable. The gate inspects relocations, names, and byte sequences to link a BCC.EXE that matches Borland's distributed binary.
Advertisement
Tech Pulse Daily
Get tomorrow's pulse first
Join engineers who read Tech Pulse before stand-up. Free, weekday mornings.
03Modding build and verification testing
Developers wishing to alter compiler internals can utilize an alternative modding build configuration. This pathway links source files using layouts chosen by TLINK rather than adhering to rigid binary positions. Because layout constraints are lifted, individual functions can expand or shrink, new data structures can sit between existing items, and supplemental source files can be introduced.
The integrity of modified builds is enforced through an automated test harness running 1,836 comparative compilations. The test corpus evaluates Borland's historical example programs alongside vintage GCC and cfront test suites, comparing outputs between Borland's original binary and the rebuilt compiler. Tests run across configurations where code and data segments are relocated in multiple ways.
Coverage analysis is conducted via a specialized tracing emulator that monitors execution paths. This emulator maps memory accesses, showing which data words act as memory addresses and recording active instructions during test runs. Testing achieves 83 percent code coverage across the compiler code base.
04Reverse engineering methodology and gates
The recovery workflow follows a multi-stage process documented in the Exhume tools documentation. Engineers identify the precise original compiler version and optimization flags, locate function boundaries, match routines against binary patterns, and verify characteristics invisible to routine matching. The assembled code is then linked with TLINK to form complete executables.
Once byte identity is achieved, contributors apply a readability pass across the recovered sources. This stage assigns descriptive variable names, populates record field structures, and adds explanatory notes detailing operational anomalies. The entire readability refactoring remains bound to the byte-for-byte gate, ensuring naming improvements never change the compiled binary.
Note: Original Borland executables are not distributed in the repository and must be acquired separately by users.
05Licensing rules and contribution terms
The project separates the intellectual property of its recovery infrastructure from the underlying reverse-engineered software. All custom automation scripts and project documentation are distributed under the permissive MIT license. Contributors can submit revisions through standard project processes covering symbol names, code comments, and behavioral analysis.
The recovered C and assembly sources derive directly from Borland's copyrighted software assets. The project provides these reconstructed sources solely for historical preservation and technical research, asserting no proprietary rights or ownership claims over Borland's original work.
Frequently asked questions
What programs are included in the Borland C++ 2.0 recovery?
The project recovers twenty-two executables, including BCC.EXE, CPP, TLINK, TASM, TLIB, MAKE, protected-mode tools like TKERNEL, runtime libraries, and a native compiler port.
How does the verification gate ensure the source code is accurate?
The gate compiles all 298 source files in DOS and checks every function byte for byte against the original binary while verifying every relocation and name.
How are modified versions of the compiler tested?
The modding build runs 1,836 comparative test compilations against original Borland examples and vintage GCC and cfront suites, reaching 83 percent test coverage.
What license applies to the Borland Reborn project?
Project scripts and documentation use the MIT license, while the recovered sources carry no claimed rights and are provided for research and preservation.
Sources
Author
Dillip Chowdary
Writes Tech Bytes coverage of AI, engineering, and the tools that actually ship. Editor of Tech Pulse Daily.
Related on Tech Bytes
Advertisement