Here is a very popular tutorial on writting a compiler by Jack Crenshaw PhD using Turbo Pascal 4.0.

TP4 you say?!?! Yup! This set of tutorials started in 1988 and was added to up until 1995 when it was seemingly abandoned, yet never finished. It contains about 16 chapters of how you would go about the various issues of developing a compiler.

Here is the link: Let's Build a Compiler