For the earliest PDP-7 implementation, a compiler was written by Ritchie using TMG(early compiler definition language) that produced machine code.