The Elements of Computing Systems: Building a Modern Computer from First Principles (Nisan and Schocken)
https://www.amazon.com/Elements-Computing-Systems-second-Pri...
I'm not sure, but I think that when I looked into it, I found out that Code started from a level or two lower, but doesn't go up as many layers of abstraction as TEOCS.
The Elements of Computing Systems: Building a Modern Computer from First Principles (Nisan and Schocken)
https://www.amazon.com/Elements-Computing-Systems-second-Pri...