Digital VT320 Terminal State Reports

Paul Flo Williams,

Quick introduction

Appendix E of Installing and Using the VT320 Video Terminal mentions Terminal State Reports, which allow the host to ask the VT320 for its current state. The host sends DECRQTSR (Request Terminal State Report) and the VT320 responds with DECTSR (Terminal State Report). At some later stage, the host can send this state report back to the VT320 to restore it to a known state, in the sequence DECRSTS (Restore Terminal State).

I’ve just found some old notes about the contents of this report, reproduced below. I’ll deal with the actual encoding of the report at some later time, but for now the table below shows the 56-byte content of the report, one byte of which is a checksum. I doubt that any host would want to interpret the report, because I would’ve thought that its precise contents could differ from one firmware revision to the next.

There are a number of blank bits in this table. The meaning of these is unknown; I wasn’t able to influence the setting of these bits by changing terminal modes or settings. I haven’t recorded the default state of these bits.

There are also a number of greyed-out bits, marked as ‘\\\’. I tried to set these bits in the DECRSTS sequence, but they always read back as zero. There are two possible explanations for this; either they don’t do anything, or they have some internal function that is masked out of the report. The latter case is plausible if we assume that bits that are reported together, live together in the VT320’s memory.

Random thoughts

Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
1 Character set in G0 code element
0x01 ASCII
0x02 National Replacement Character (NRC) set
0x03 DEC Special Graphics
0x10 Soft character set (DRCS)
0x20 DEC Supplemental Graphics
0x21 ISO Latin-1
0x40 User-Preferred Supplemental Set (UPSS)

Default: 0x01 (ASCII)

2 Character set in G1 code element
Default: 0x01 (ASCII)
3 Character set in G2 code element
Default: 0x40 (UPSS)
4 Character set in G3 code element
Default: 0x40 (UPSS)
5 Code element in GL
Default: 0
6 Code element in GR
Default: 2
7 Character set in GL
8 Character set in GR
9 Single-shifted code element in GL
10 Saved row (y)
Power-up default is 1
11 Saved column (x)
Power-up default is 1
12 Saved character attributes
13
14 Saved character set in G0
15 Saved character set in G1
16 Saved character set in G2
17 Saved character set in G3
18 Saved code element in GL
19 Saved code element in GR
20 Saved character set in GL
21 Saved character set in GR
22 tab column 8 tab column 7 tab column 6 tab column 5 tab column 4 tab column 3 tab column 2 tab column 1
23 tab column 16 tab column 15 tab column 14 tab column 13 tab column 12 tab column 11 tab column 10 tab column 9
24 tab column 24 tab column 23 tab column 22 tab column 21 tab column 20 tab column 19 tab column 18 tab column 17
25 tab column 32 tab column 31 tab column 30 tab column 29 tab column 28 tab column 27 tab column 26 tab column 25
26 tab column 40 tab column 39 tab column 38 tab column 37 tab column 36 tab column 35 tab column 34 tab column 33
27 tab column 48 tab column 47 tab column 46 tab column 45 tab column 44 tab column 43 tab column 42 tab column 41
28 tab column 56 tab column 55 tab column 54 tab column 53 tab column 52 tab column 51 tab column 50 tab column 49
29 tab column 64 tab column 63 tab column 62 tab column 61 tab column 60 tab column 59 tab column 58 tab column 57
30 tab column 72 tab column 71 tab column 70 tab column 69 tab column 68 tab column 67 tab column 66 tab column 65
31 tab column 80 tab column 79 tab column 78 tab column 77 tab column 76 tab column 75 tab column 74 tab column 73
32 tab column 88 tab column 87 tab column 86 tab column 85 tab column 84 tab column 83 tab column 82 tab column 81
33 tab column 96 tab column 95 tab column 94 tab column 93 tab column 92 tab column 91 tab column 90 tab column 89
34 tab column 104 tab column 103 tab column 102 tab column 101 tab column 100 tab column 99 tab column 98 tab column 97
35 tab column 112 tab column 111 tab column 110 tab column 109 tab column 108 tab column 107 tab column 106 tab column 105
36 tab column 120 tab column 119 tab column 118 tab column 117 tab column 116 tab column 115 tab column 114 tab column 113
37 tab column 128 tab column 127 tab column 126 tab column 125 tab column 124 tab column 123 tab column 122 tab column 121
38 tab column 132 tab column 131 tab column 130 tab column 129
39 top margin
Set to 1 if no margin has been set
40 bottom margin
Set to 24 if no margin has been set
41
single shift
0 = no single shift
1 = code element in [9] is single-shifted into GL
42
display
0 = main display
1 = status display
DECNRCM
0 = reset (multi­national)
1 = set (national)
setup
0 = online, main display
1 = offline, setup display
43 \\\
DECOM
0 = move outside margins
1 = move within margins
\\\
IRM
0 = replace characters
1 = insert characters
\\\ \\\ \\\ \\\
44
 
0 = caps lock
1 = shift lock
SRM
0 = no local echo
1 = local echo
DECSCNM
0 = dark screen
1 = light screen
DECAWM
0 = no autowrap
1 = autowrap
DECTCEM
0 = cursor
1 = no cursor
LNM
0 = no newline
1 = newline
DECCKM
0 = normal cursor keys
1 = application cursor keys
DECKPNM/AM
0 = numeric keypad
1 = application keypad
45
 
0 = no auto answerback
1 = auto answerback
 
0 = no break
1 = break
\\\ \\\
DECARM
0 = no auto repeat
1 = auto repeat
DECCOLM
0 = 80 columns
1 = 132 columns
\\\
DECKBUM
0 = typewriter keys
1 = data processing keys
46 \\\ \\\ \\\ \\\
 
0 = UDKs unlocked
1 = UDKs locked
 
0 = no margin bell
1 = margin bell
 
0 = no warning bell
1 = warning bell
 
0 = no key click
1 = key click
47 \\\
DECAUPSS
0 = DEC Supplemental
1 = ISO Latin-1
DECPEX
0 = print scroll region
1 = print full screen
DECSCLM
0 = jump scroll
1 = smooth scroll
 
0 = underline cursor
1 = block cursor
DECPFF
0 = form feed
1 = no form feed
 
0 = 8-bit characters
1 = 7-bit characters
CRM
0 = interpret controls
1 = display controls
48
 
0 = <>
1 = <> sends `~
 
0 = `~
1 = `~ sends ESC
 
0 = ,, and ..
1 = ,< and .>
 
0 = no compose
1 = compose
 
0 = ⌫ is delete
1 = ⌫ is backspace
\\\
49
print mode
00 = normal
01 = auto
10 = controller
50
SGR
0 = steady
1 = blink
SGR
0 = normal intensity
1 = bright
SGR
0 = normal video
1 = reverse video
SGR
0 = no underline
1 = underline
 
0 = glyph table 1
1 = glyph table 2
DECSCA
0 = eraseable
1 = not eraseable
 
0 = visible characters
1 = invisible characters
\\\
51 \\\ \\\
print mode
00 = print national only
01 = print national & line drawing
10 = print all characters
\\\ \\\
DECSSDT
00 = no status display
01 = indicator status display
10 = host writeable status display
52 \\\ \\\ \\\ \\\
terminal id
000 = VT100 011 = VT220
001 = VT101 100 = VT320
010 = VT102
53 don’t change these bits; they horribly remap the keyboard
keyboard
0000 = N. American 0100 = Danish 1000 = Italian 1100 = Norwegian
0001 = British 0101 = Finnish 1001 = Swiss (French) 1101 = French/Belgian
0010 = Flemish 0110 = German 1010 = Swiss (German) 1110 = Spanish
0011 = Canadian (French) 0111 = Dutch 1011 = Swedish 1111 = Portuguese
54 current row (y)
55 current column (x)
56 checksum