Sunday, 29 November 2026

Trusted News Discovery โ€“ Powered by AI and Verified by Humans

Borland C++ 2.0's 1991 compiler rebuilt byte for byte from its own executable by the borland-reborn project

Borland C++ 2.0's compiler and 21 other 1991 tools now rebuild byte for byte from recovered source, thanks to the borland-reborn project on GitHub.

Produced with AI assistance and reviewed by the Badiyaa Editorial Desk. How we work.

Grok Fact CheckCheck it yourself in one tapVerify with Grok ↗Ask @grok on X ↗
An IBM PC 5150 desktop computer with its monitor and keyboard.
Image: edwardhblake, CC BY 2.0 via Wikimedia Commons

Somebody just rebuilt a 35-year-old compiler from nothing but its own executable, and the result matches Borland's original down to the last byte. The project is called borland-reborn, and its first trophy is BCC.EXE, the compiler at the heart of Borland C++ 2.0 from 1991.

The aim, as the borland-reborn repository on GitHub puts it, is to recover the source code of classic Borland compilers from the programs Borland shipped. The recovered C and assembly, fed back through Borland's own 1991 tools, must produce each executable byte for byte. Then the code is made readable, with real names, named fields and comments on every file.

22 programs, zero bytes out of place

The haul so far is the whole Borland C++ 2.0 kit: the compiler, the preprocessor, the TLINK linker, the TASM assembler, the librarian, MAKE, the protected-mode tools and the utilities, 22 executables in all. The repository says every one of them now rebuilds byte-identical.

The verification step is brutal in the best way. A single command compiles all 298 recovered source files inside DOS, checks each function against the original, verifies every relocation and name, then links a brand-new BCC.EXE and confirms it is identical to Borland's.

How do you un-bake a cake?

The method is laid out in the project's How It Works guide, and it starts with a bold claim: byte-identical output is the only test "that cannot be argued with."

First came forensics. The team had to pin down exactly which compiler and switches built BCC.EXE. The answer: Borland C++ 2.0 compiled itself. The hand-coded pieces went through the TASM 2.51 assembler, and the TLINK 4.0 linker stitched everything together using Borland's VROOMM overlay system. Then came a twist. Twenty-nine run-time library modules turned out to have been built by an older compiler, Turbo C 2.01, which gave itself away by the way it shuffled far pointers.

After that, it was one file at a time: write C or assembly, compile it under DOS with the original compiler, read the instruction-level differences, and adjust until nothing differs. The guide's two house rules are strict. Hand-written assembly stays assembly and compiled C stays C, and there are "no tricks": compiled code is never faked with inline assembly, and nothing gets patched at the byte level. Quirks in the original, such as dead stores, are kept in the recovered source and flagged.

Names were never guessed, either. Each one is logged with its evidence. The readability pass added about 300 field names and 40 record layouts, and comments were checked so they cannot change the code.

A compiler you can now mod

There is also a modding build that lets functions grow or shrink and new files join. It is tested by running 1,836 compiles through both compilers, including Borland's own example programs, and comparing every output. A tracing emulator shows those tests exercise 83% of the compiler's code.

Borland C++ itself was the successor to Turbo C++, and its Wikipedia version history lists 2.0 as the 1991 MS-DOS release, followed the same year by 3.0 with Windows support. The line eventually became today's C++Builder.

Want to try it? You will need your own copies of the original Borland programs, which are not included. The project's scripts are MIT-licensed, while the recovered sources are offered for study and preservation with no rights claimed. More Borland and Turbo versions are promised next.

For more Borland lore, read how Turbo Pascal 3.02 squeezed a compiler and editor into 39,731 bytes, and for another tale of preserved source code, how Lions' Commentary on Unix survived as a banned textbook and Berkeley's BSD Unix broke free of AT&T.

Sources

Image: edwardhblake, CC BY 2.0 via Wikimedia Commons

This article was produced with AI assistance and reviewed by our Editorial Desk. How we work.

Grok Fact CheckCheck it yourself in one tapVerify with Grok ↗Ask @grok on X ↗