Terminal Emulation

Here are some materials which will hopefully dissuade you from wanting to write a terminal emulator. Aren’t there enough poor ones in the world already?

OK, if you’re serious, you need two things:

  1. A complete specification of the terminal you want to emulate.
  2. The real terminal itself, to check behaviour.

Good luck on finding the first item in the list. DEC’s published documentation doesn’t include a specification of the behaviour of the terminal for every possible stimulus and state.

I have written a specification for one tiny part of the behaviour of DEC’s VTs, though it is an important part.

Codes and Standards

Digital printers and terminals produced after about 1977 started discarding proprietary control sequences in favour of standardised codes. The original ANSI standards and the subsequent ISO/IEC standards are not available for free, but their ECMA equivalents are. If you are intending to write an emulator, you should read the following standards as well as the documentation for the printer or terminal you are emulating.

These standards are freely downloadable as PDFs.

Reading these is daunting at first because they are considerably more extensive than the implementations in Digital terminals and printers. When reading ECMA-35, for example, you can disregard the details of multiple-byte character sets.

These standards make provision for private extensions to the control functions in a fashion which allows less-capable devices to ignore them. I am trying to collate details of Digital’s extensions from terminal and printer manuals. The documents below are works in progress.

Code fingers were an attempt of mine to show terminal features graphically.