Have you been trying to learn how compilers and programming languages work?
Then come along! Let’s make a compiler that goes all the way from source to assembly from scratch—no shortcuts!
This book will teach you enough compiler theory and assembly programming to get going. It uses a subset of TypeScript that reads like pseudocode and targets ARM 32-bit instruction set.
Part I: Baseline Compiler
Part II: Compiler Extensions
Appendices
My name is Vladimir Keleshev. I am a software developer living and working just outside of Copenhagen. I have worked with embedded systems, safety-critical systems, compilers, and now in finance with domain-specific languages.
The cover is illustrated by Katiuska Pino. She also drew 15 chapter illustrations that are exclusive to the print edition of the book.
Print edition consists of 207 pages, size 6×9” (152×229 mm), in matte hard cover, available at lulu.com. ISBN: 978-87-980078-0-7.
This book was originally published in 2020 as ebook. The online edition replaces the ebook edition.
@book{Keleshev:2024,
author="Vladimir Keleshev",
title="Compiling to Assembly from Scratch",
publisher="keleshev.com",
year=2024,
isbn="978-87-980078-0-7",
note="Originally published in 2020 as ebook",
}
Source code from the book is available on GitHub. Python and OCaml ports of the compiler are available as well.