the chapter of #Crenshaw’s #compilers #tutorial on expression parsing, with example code in Pascal to emit 68000 code, describing a simple register-allocation approach near the end, though without example code for that
Darius’s #PEG parser example compiler for assignment statements with infix expressions to a notional assembly language in 32 lines of code using Parson. #small-is-beautiful