The first is a TECO from the fourth floor V6 machine (DSSR/RTS) at Tech Sq at
MIT:
I happen to remember how PDP-8 Teco stored its content. In Teco, for those who have never made its acquaintance, there is the current buffer (which does not typically contain all of the current file) and a bunch of named Q-registers that store blobs of text. Since the PDP-8 is a 12-bit machine, the normal way to store ASCII uses three characters in two words: one in the low 8 bits of the first word, one in the low 8 bits of the second, and one in the top four bits of both words, split big-endian.
In Teco, however, the current buffer is stored in the bottom 8 bits of a single 4KW memory field. The Q-registers are stored in alphabetical order by name (a single character) using the straddling top-4-bits method described above. Because the processor cycle time was the same as memory access time anyway, this storage method was perfectly adequate.
You can also look at the source for Teco-C, which is available in several places on the net, the last I looked.