MIT 6.035 - Computer Language Engineering [3]: This course analyzes issues associated with the implementation of higher-level programming languages. Topics covered include: fundamental concepts, functions, and structures of compilers, the interaction of theory and practice, and using tools in building software. The course includes a multi-person project on compiler design and implementation.
[1] https://lagunita.stanford.edu/courses/Engineering/Compilers/...
[2] http://web.stanford.edu/class/cs143/
[3] https://ocw.mit.edu/courses/electrical-engineering-and-compu...
https://www.inf.ethz.ch/personal/wirth/
On the way you can also grab "Project Oberon" from there, both 1992 and 2013 editions, to see how to write an OS from scratch, including an FPGA board, in a GC enabled systems programming language.
There are also the tiger books, in C, Java and ML variants.
He explains every detail, goes through every routine, and you can see exactly what the compiler does. It's 'Small-C' so it doesn't have any fancy features, like floats or structs. But the basic machinery is there, and one can add features as desired. It does compile itself. The compiler outputs x86 assembly, which must be assembled and linked with standard programs.
The original Small-C was done by Ron Cain, and produced 8080 code. I like Mr. Hendrix' better because I have lots of x86 around (I specifically wanted it for my HP-200 LX palmtop, which I still have and works great!); and because the book is fantastic.
It's fully understandable in a small quantity of time. And, the back end is re-targetable, so you could, say, output to ARM or RISC-V or whatever.
I spoke with Mr. Hendrix some years ago, maybe 10 or so, and asked if he would consider putting the compiler into the public domain. He did.
In case anyone else is interested, there is a freely available ISO of the the book available from Dr Dobbs Journal. From the README in the ISO:
>"Welcome to Dr. Dobb's Small-C Resource CD-ROM, the definitive collection of Small-C related information and source code. This CD-ROM includes the full text to James Hendrix's book "A Small-C Compiler: Language, Usage, Theory, and Design," selected articles on Small-C from "Dr. Dobb's Journal" magazine, and Small-C implementations for a number of processor platforms, including the 8080, Z80, 6502, and others."
It's available here:
http://www.drdobbs.com/developer-network-small-c-compiler-bo...
[1] https://github.com/IUCompilerCourse/Essentials-of-Compilatio...
Thanks, I'll put in the pile of things to read.