[TUHS] Data structures in Unix editors
cowan at ccil.org
Fri Apr 2 06:57:22 AEST 2021
On Thu, Apr 1, 2021 at 4:31 PM Noel Chiappa <jnc at mercury.lcs.mit.edu> wrote:
> The first is a TECO from the fourth floor V6 machine (DSSR/RTS) at Tech Sq
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.
John Cowan http://vrici.lojban.org/~cowan cowan at ccil.org
Heckler: "Go on, Al, tell 'em all you know. It won't take long."
Al Smith: "I'll tell 'em all we *both* know. It won't take any longer."
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the TUHS