Here it is, my latest compiler book! Basically an expanded version of "Write Your Own Compiler", this time discussing code generation for CP/M on the Z80 (instead of ELF on modern systems), which simplifies some things a lot.<p>How much complexity do you need to self-compile a compiler in 10 minutes on a 4MHz Z80 system? Take a look and find out! The code is free (but the book is not).
Recently I made C multipass compiler (and asembler) in typescript for such old x86 CPUs<p><a href="https://github.com/Mati365/ts-c-compiler">https://github.com/Mati365/ts-c-compiler</a>
This book looks fun. But I'm still waiting for a worthy successor of The Dragon Book, discussing optimizations for modern CPUs (and perhaps GPUs), and also discusses how to design/write a modern VM with a fast concurrent GC (something that some might say is even harder than writing the compiler!)
This looks really interesting, however a disadvantage is that the reader needs to know or learn a new programming language first T3X. I wonder if one could start from scratch on a CP/M system: write and develop the compiler on a retro system that has no connection to the outside world except the keyboard and display.
This comment is not ment to be negative, just some insight that might be valuable.<p>I read the free chapter. One thing I noticed right away was that I think some things can be hard for people with not so much knowledge about the topic: under each headline, it explains a concept from the ground up, no knowledge required. Like "the syntax of a language is...". But just a few sentences in, advanced topics are touched, like assembly instructions, not explained. It feels a bit like "the curse of knowledge", where it's hard to know what the other party knows. But if the reader needs to learn what syntax means, they will probably not understand the next sentences.<p>So, I think more consistency could improve the product.<p>This is of course just my meaning and interpretation of the text, it might not be relevant. But maybe something to have in mind for your next masterpiece :)
Apart from the actual book content, I enjoy your appropriately retro and minimalist web design. It's giving me a huge nostalgia hit. Fond memories of hand crafting my own sites with a 6 inch thick book titled something like "HTML 3.2 UNLEASHED!!!!" on my desk :)
Why such a focus on retro computing? As an oldie I think it's cool (though a bit impractical learning the parts that aren't applicable to modern stuff), but my son is interested in learning operating systems, compilers, etc, and I could never get him to use something so "outdated."<p>To be clear, I'm not attempting to criticize with this question (my personal opinion is write about what interests you, even if nobody else will care), I'm assuming you choose older targets for a reason, and would like to undestand those reasons :-)<p>I.e. Do you believe the retro targets to be a lot simpler and easier to understand, so people can iterate/build in layers? Or do you just know the retro stuff better so it makes for a better book?