Geode Cities

Rooms

Settings

Table of Contents

Chapter 1 - Morse Code and the Teleprinter

The Morse system, more or less, forms the basis for all modern digital signaling protocols. As designed and refined in the mid 1800s, using Morse code is a very manual process.

The next step in digital signaling after the Morse telegraph was the Teleprinter (also called the Teletype or Teletypewriter) which was invented around 1887. The Teleprinter came long before computer systems, and was invented as an electro-mechanical system (like a pinball machine).

The Teletype, which still lives on in Unix terminology as the TTY, was the first commercial method for sending information digitally that could be operated fully automatically.

The teletype/teleprinter machine was a device with two mostly independent electromechanical subsystems: an encoding system with a typewriter-style keyboard (the "type" part of the device) and a decoding system with a typewriter-style ribbon and paper (the "print" part of the device).

Depiction of a Teleprinter in a manual distributed by Teletype Corporation (via Internet Archive). See a teleprinter in action on YouTube in this Short posted by Fran Blanche of Fran Lab. It shows the teleprinter at the InfoAge Science Museum, as restored by the New Jersey Antique Radio Club.

In its original popular form, the teleprinter system used a binary code with fixed-width signaling blocks called the Baudot code. Unlike morse where each character can have any number of parts (and more common characters get shorter sequences) separated by periods of silence / no voltage, the Baudot code used by teletype machines used a fixed 5-impulse binary code where two machines with calibrated clockwork would check the signaling line at an agreed interval. The signaling line transmitted a signal using curent loops, which signaled using a code of flowing current for "mark" and an interruption of the current for "space", with usages similar to our modern usage of "0" and "1" respectively.

Between transmitted characters the signaling loop would be kept closed allowing current to flow and transmitting an indefinite-length mark impulse. Keeping the loop closed by default allowed network operators to determine the difference between no activity on the loop and a broken loop.

Each 5-impulse code would start with an extra "start" space impulse. This start impulse would break any previous indefinite-length mark impulse. The beginning of the starting space impulse allowed receiving machines to synchronize thier clockwork with the sending machines.

After the start impulse, the next five impulses signaled would compose the 5-impulse Baudot code. Let's say we had devices on a loop all configured for one-second impulse timings. The transmitting machine would start to interrupt or connect the loop to produce the next signal impulse exactly one second after the previous impulse began. Receiving machines would check the loop slightly faster, 7/8ths of a second after the previous impulse, so that they can be sure to catch the signal before it changes.

Once all five signaling impulses were transmitted, an indefinite-length "stop" marking impulse would be transmitted. The stop impulse gave receiving machines time to mechanically re-set in anticipation of the next start impulse. Different machines would require different minimum re-set periods, with minimum periods of 1, 1.5, and 2 being common.

The Baudot signaling code (via Internet Archive).

The Baudot code is a kind of modal code, using two banks of characters that the sender can switch between using a capslock-style "Figure Shift" or "Letter Shift" to indefinitely switch between character banks, like how capslock shifts between lowercase and uppercase character banks. By sending the "Letter Shift" code, receiving devices will shift to the letter character bank and then sending certain key codes will result in letters being written on the page. By sending the "Figure Shift" code, receiving devices will shift to the figure character bank and then sending those same key codes will result in numbers and symbols being written on the page instead. One special figure, BELL, will cause the device to strike a metal bell within the device instead of the page, audibly alerting the receiving machine's operator.

While in reality teleprinters were calibrated to signal many times per second, once per second is an easy value to use for demonstration purposes. At one signal per second, if I wanted to send a message that said "OK" I could perform these signals over a 35 second period (using _ for "space" and * for "mark"):

_**_*** - Figure Shift (to shift to the "figure" set of ribbon strikers)
_*_*__* - BELL (to make an audible sound and alert the operator of my incoming message)
_****** - Letter Shift (to shift to the lettering set of ribbon strikers)
____*** - O
_****_* - K

With each character transmitted, a metal stamp at the end of an arm will hammer the ribbon of pressure-activated adhesive ink into the page. Areas of the ribbon crushed between the highs of the stamp and the page will adhere to the paper, but areas of ribbon underneath the lows of the stamp will not be crushed so the ink will stay on the ribbon and leave the paper white. This effectively transfers the embossed character from the stamp's surface to the page.

Baudot code was used for ages, alongside other less standardized signaling codes, but much later there was a concerted effort to replace the 5-bit code with a standard 7-bit code in the 1960s. This new code, developed by the American Standards Assocation, was named the American Standard Code for Information Interchange (ASCII). Its first commercial use was in the Teletype model 33 and 35 released in 1963 and promoted by the Bell company

The ASCII system, rather than shifting between two sets of character banks, had a set of characters where each was uniquely identified by a single 7-bit code. They added a bunch of new control characters (meant to more precisely control the teleprinter) and symbols.

As a standard system for sending text to paper that used digital signaling, the teleprinter was of high interest to the engineers who developed early digital computers in the 1950s. The teletype's transmit and receive signal loop would be wired into a computer system, so that the computer could measure the signal and decode the key codes as numeric characters of its own text encoding scheme. The computer could do some processing, then come up with some new digital data that it would then encode back into teleprinter key codes and signal them back onto the loop. The computer's signals would be picked up by the teleprinter at the user's desk and get rendered as text on the sheet of paper. Through this method, computers were able to produce textual output to paper logs. This was a standard interface for computer operation for decades really until the invention and cost reduction of newer interfaces.

Unix systems were designed around the teletype machine. The first text editor developed for Unix systems, ed, was designed to be used with one of these teletype/teleprinter systems

The ed editor was the quintessential example of a teletype-compatible application. More friendly to computers than people, the ed software defined a series of keystrokes that could be used to encode modifications to a text document. Here's a sample from Wikipedia, starting with the user typing and showing computer responses as lines ending with $:

a
ed is the standard Unix text editor.
This is line number two.
.
2i

.
,l
ed is the standard Unix text editor.$
$
This is line number two.$
w text.txt
63
3s/two/three/
,l
ed is the standard Unix text editor.$
$
This is line number three.$
w text.txt
65
q

Where a marks to start appending text into a blank document, . on a line by its own ends the input, 2i means to insert a new content at line index 2, ,l means to list out the contents of all lines of text in memory, w file.txt means to write the text from memory into file, etc.

Notably, ed introduced the first regular expressions as a way to edit existing lines of text without having to rewrite them entirely, which would have been both slow and a waste of typewriter ribbon. The command 3s/two/three/ would have been to replace the text "two" with "three" on line 3 of the document in memory.

Recommended viewing: Using a 1930 Teletype as a Linux Terminal by @CuriousMarc on YouTube. Read more about the project on their website.

When you have one computer and a teletype machine with teleprinter, you can interface with with the computer yourself. When you have two computers set up to use teletype machine interfaces, you can literally plug the output from one into the input of another. This allows one computer to, for example, operate ed on another computer.

Once you've plugged two computers into each other in this manner, you are still using a "TTY" interface, but there is no actual teletype machine in the connection. It's just computers talking to each other.

These kind of interfaces are, more generically, called serial connections. They're named as such because they send data between computers "serially" in the sense that one bit of information is passed per unit of time, in some serial order to produce meaning.

Chapter 2 >