Turbo Pascal Compiler Written in Turbo Pascal turbo51.com · 14 points · 2 commen...
HN Best 200 @best
Turbo Pascal Compiler Written in Turbo Pascal turbo51.com · 14 points · 2 comments · HN thread
TL;DR The page offers TPC16, a Turbo Pascal 7 command-line compiler written from scratch in Turbo Pascal by an independent author, sold as source code for a fee. The author says it is source-compatible with Borland's TPC.EXE and produces identical 16-bit x86 TPU/EXE output, and pitches it as a learning resource for compiler construction. A free demo exe is offered, while the full source requires payment.
- TPC16 is a Turbo Pascal 7 command-line compiler written from scratch, not Borland's original source, which the author says was likely written in assembly.
- The author claims it is source-level and binary-level compatible with TPC.EXE, generating 16-bit x86 code and TPU/EXE files; map files and debug info are not implemented.
- It is built to compile itself, but because of DOS memory limits it must be compiled with BPC.EXE rather than TPC.EXE.
- The package is pitched as a teaching resource covering scanners, hash tables, symbol tables, register-limited code generation, an optimizing code generator and linker.
- Full source is paid; a demo exe without compiler-unit sources is free. The related TPC32 version targets Delphi 7 and 32-bit offsets and is sold separately.
- Source files are paid for, with the author citing the effort involved and presenting the price as a fraction of the value.
Discussion The thread is very small, with only two comments. One commenter praises the idea of paying for the project as a way to support an independent author, and notes that it has been around for a few years and corrects the article's claim about Borland's original source being in assembly. The other comment reminisces about how fast Turbo Pascal compiled on old hardware, and suggests running it in DOSBox to appreciate it. The mood is nostalgic and positive.
- Paying for the project is a worthwhile way to support its author (some): One commenter says buying this feels like real donation to someone who can use the money, given the project has existed for a few years.
- Turbo Pascal was historically written in assembly, not Pascal (some): A commenter clarifies that Borland's original compiler was written in assembly in the CP/M era and gradually gained more Pascal code as the language evolved.
- Turbo Pascal compiled remarkably fast on old machines (some): A commenter recalls that Turbo Pascal was very fast even on old hardware, often outpacing modern projects, and suggests trying it in DOSBox.