DEC VT100/220 line wrapping semantics sought

Mattias Engdegård mattiase at acm.org
Sun Jan 1 13:39:07 CST 2017


Would someone with a real DEC VT terminal be so kind and help settle, once and for all, the question about how they behave with respect to line-wrapping, exactly? It is something that isn't covered by any standard, nor by any of DEC's manuals, and there is a scarcity of information online that is not vague repetition of folklore.

There are emulators, of course, but these do not agree with one another to the point that they can be trusted, and are probably just copying each other in any case. It seems that some ground truth would be welcome, for the benefit of both application and emulator writers.

First, the problem: A VT100, when in "auto-wrap" mode, will wrap text from one line to the next in a peculiar way, sometimes called "soft-wrap" or "the VT100 glitch". When the terminal receives a printable character with the cursor in the last column, the character is put at that location but the cursor remains in place. Instead, the terminal enters a pending wrap state, which causes the cursor to wrap before next printable character is displayed. This behaviour is widely known.

What isn't widely known are the finer points:

* What control codes will cancel the wrap state?
* What cursor position is reported in the wrap state?
* Do any operations behave differently in the wrap state?
* Is the wrap state saved/restored by the save/restore cursor codes?

and so on. Every emulator programmer seems to have a different answer to these questions.

If you have a VT100, VT220 or later model (compatibles like Wyse are also of interest) and have a spare moment, I'd be most grateful if you would download and run

https://raw.githubusercontent.com/mattiase/wraptest/master/wraptest.c

in that terminal, and send me the resulting output. (Redirect stdout to save the report.)
The test program is not comprehensive but would give us a good idea of the rules.

Current results, right now only from various emulators, are found in

https://raw.githubusercontent.com/mattiase/wraptest/master/results.txt




More information about the cctalk mailing list