All texts on how to create a compiler stop after explaining lexers and parsers. They don\'t explain how to create the machine code. I want to understand the end-to-end process.<
For Linux, one may read and run the examples from "Programming from the Ground Up" by Jonathan Bartlett:
http://www.cs.princeton.edu/courses/archive/spr08/cos217/reading/ProgrammingGroundUp-1-0-lettersize.pdf
Then of course one may prefer to hack Windows programs. But perhaps the former gives a better way to understand what really goes on.