This document is a case study of writing and bootstrapping a compiler for a simple (but structured) language from scratch. It targets i386 Linux. It starts from a single hex-to-binary converter, and repeats this many times: write a little compiler for a little bit smarter language in the old language, compile it, then rewrite it to the new language. After about a dozen iterations a compiler for a structured language is created. See also the source code. Done in 2001.
1 year ago