Appendix C

VT101, VT102 and VT131 Programming Summaries

The VT101 uses the sequences outlines for the VT100 family. See Appendix B.

A summary of VT102 and VT131 escape and control sequences are described in this appendix.

VT102

Control Characters Received

Name Character Mnemonic Octal Code Function
End Of Text ETX 003 This character can be selected as a half-duplex turnaround character.
End Of Transmission EOT 004 This character can be selected as a disconnect character or as a half-duplex turnaround character. When used as a turnaround character, the disconnect character is DLE-EOT.
Enquire ENQ 005 This character transmits the answerback message.
Form Feed FF 014 This character is processed as LF. (See Appendix B.) It can also be selected as a half-duplex turnaround character.
Carriage Return CR 015 This character moves the cursor to left margin on the current line. It can also be selected as a half-duplex turnaround character.
Device Control 3 DC3 023 This character is processed as XOFF. It causes the terminal to stop transmitting all characters except XOFF and XON.

This character can also be selected as a half-duplex turnaround character.

ANSI Compatible Sequences

Set Mode
Name Mnemonic Mode Sequence
Keyboard action KAM Locked ESC [ 2 h
Insertion-replacement IRM Insert ESC [ 4 h
Send-receive SRM Off ESC [ 12 h
Print form feed DECPFF On ESC [ ? 18 h
Print extent DECPEX Full Screen ESC [ ? 19 h
Reset Mode
Name Mnemonic Mode Sequence*
Keyboard action KAM Unlocked ESC [ 2 l
Insertion-replacement IRM Replace ESC [ 4 l
Send-receive SRM On ESC [ 1 2 l
Print form feed DECPFF Off ESC [ ? 18 l
Print extent DECPEX Scrolling Region ESC [ ? 19 l
* The last character of the sequence is lowercase L (1548).
Character Attributes (VT102 and VT131)
Name Mnemonic Sequence
Select Graphic Rendition (select attribute blink) SCR ESC [ 5 m
Editing Functions
Name Mnemonic Sequence
Delete character DCH ESC [ Pn P
Insert line IL ESC [ Pn L
Delete line DL ESC [ Pn M
Print Commands
Name Mnemonic Sequence
Media copy (enter auto print) MC ESC [ ? 5 i
Media copy (exit auto print) MC ESC [ ? 4 i
Media copy (enter printer controller) MC ESC [ 5 i
Media copy (exit printer controller) MC ESC [ 4 i
Media copy (print screen) MC ESC [ i
Media copy (print screen) MC ESC [ 0 i
Media copy (print cursor line) MC ESC [ ? 1 i
Reports
Name Mnemonic Sequence
Response: Printer ready DSR ESC [ ? 10 n
Response: Printer not ready DSR ESC [ ? 11 n
Response: No printer DSR ESC [ ? 13 n
Test and Adjustments
Name Mnemonic Sequence
Invoke confidence test
(EIA modem control test. Requires test connector.)
DECTST ESC [ 2 ; 4 y
Invoke confidence test
(repeat EIA test continuously until failure or power-off. Requires test connector.)
DECTST ESC [ 2 ; 12 y
Invoke confidence test
(printer port data loopback test. Requires test connector.)
DECTST ESC [ 2 ; 16 y
Invoke confidence test
(repeat printer port data loopback test continuously until failure or power-off. Requires test connector.)
DECTST ESC [ 2 ; 24 y
Keyboard LEDs
Name Mnemonic Sequence
Load LEDs (L1 off) DECLL ESC [ q
Load LEDs (L1 on) DECLL ESC [ 1 q

VT52 Compatible Mode

Print Commands
Name Sequence
Enter auto print mode ESC ^
Exit auto print mode ESC _
Enter printer controller mode ESC W
Exit printer controller mode ESC X
Print screen ESC ]
Print cursor line ESC V

VT131

Control Characters Received

Name Character Mnemonic Octal Code Function
End Of Text ETX 003 Can be selected as a half-duplex turnaround character.
End Of Transmission EOT 004 Can be selected as a disconnect character or half-duplex turnaround character. When used as a turnaround character, the disconnect character is DLE-EOT.
Horizontal tab HT 011 Moves cursor to next tab stop, or to right margin if there are no more tab stops.

In edit mode, the tab character positions the cursor, and the character is not held in memory. When the character is received, the cursor moves to one of the following locations.

  • Next tab stop
  • Next field boundary (if erasure mode is set)
  • Next unprotected field (if erasure mode is reset)
  • First unprotected character position in the scrolling region (if the cursor is above the scrolling region)
  • Last character position of the screen (if the cursor is below the scrolling region)

In edit mode, a tab received with no more tab stops or fields, causes the cursor to move to the end of the screen region.

Linefeed LF 012 Causes a linefeed or a new line operation. (See linefeed/new line mode.) Also causes printing if auto print operation selected.
Form Feed FF 014 Processed as LF. FF can also be selected as a half-duplex turnaround character.
Carriage Return CR 015 Moves cursor to left margin on current line. CR can also be selected as a half-duplex turnaround character.
Device Control 3 DC3 023 Processed as XOFF. DC3 causes terminal to stop transmitting all characters except XOFF and XON. DC3 can also be selected as a half-duplex turnaround character.

ANSI Compatible Sequences

Set Mode
Name Mnemonic Mode Sequence
Guarded area transfer GATM All ESC [ 1 h
Keyboard action KAM Locked ESC [ 2 h
Insertion-replacement IRM Insert ESC [ 4 h
Erasure ERM All ESC [ 6 h
Send-receive SRM Off ESC [ 12 h
Transfer termination TTM Full page ESC [ 16 h
Editing DECEDM Edit ESC [ ? 10 h
Line transmit DECLTM On ESC [ ? 11 h
Space compression/field delimiter DECSCFDM On ESC [ ? 13 h
Transmit execution DECTEM Immediate ESC [ ? 14 h
Edit key execution DECEKEM Immediate ESC [ ? 16 h
Print form feed DECPFF On ESC [ ? 18 h
Print extent DECPEX Full screen ESC [ ? 19 h
Reset Mode
Name Mnemonic Mode Sequence
Guarded area transfer GATM Unprotected ESC [ 1 l
Keyboard action KAM Unlocked ESC [ 2 l
Insertion-replacement IRM Replace ESC [ 4 l
Erasure ERM Unprotected ESC [ 6 l
Send-receive SRM On ESC [ 12 l
Transfer termination TTM Scrolling region ESC [ 16 l
Editing DECEDM Interactive ESC [ ? 10 l
Line transmit DECLTM Off ESC [ ? 11 l
Space compression/field delimiter DECSCFDM Off ESC [ ? 13 l
Transmit execution DECTEM Deferred ESC [ ? 14 l
Edit key execution DECEKEM Deferred ESC [ ? 16 l
Print form feed DECPFF Off ESC [ ? 18 l
Print extent DECPEX Scrolling region ESC [ ? 19 l
* The last character of the sequence is lowercase L (1548).

Character Attributes (See VT102)

Editing Functions
Name Mnemonic Sequence
Delete character DCH ESC [ Pn P
Insert line IL ESC [ Pn L
Delete line DL ESC [ Pn M
Character Protection
Name Mnemonic Sequence*
Protected field attributes (no protection) DECPRO ESC [ 0 }
Protected field attributes (bold protection) DECPRO ESC [ 1 }
Protected field attributes (underline protection) DECPRO ESC [ 4 }
Protected field attributes (blink protection) DECPRO ESC [ 5 }
Protected field attributes (reverse video protection) DECPRO ESC [ 7 }
Protected field attributes (all attributes off protection) DECPRO ESC [ 2 5 4 }
* The last character of the sequence is } (1758).
Transmission Request
Name Mnemonic Sequence
Set transmit state STS ESC S
Transmission Enable
Name Mnemonic Sequence
Transmit DECXMIT ESC 5
End of Block Character
Name Mnemonic Sequence*
Transmit termination character (function disabled) DECTTC ESC [ 0 |
Transmit termination character (Form Feed, FF) DECTTC ESC [ 1 |
Transmit termination character (End of Text, ETX) DECTTC ESC [ 2 |
Transmit termination character (End of Transmission, EOT) DECTTC ESC [ 3 |
Transmit termination character (Carriage Return, CR) DECTTC ESC [ 4 |
Transmit termination character (Device Control 3, DC3) DECTTC ESC [ 5 |
* The last character of the sequence is | (1748).
Print Commands
Name Mnemonic Sequence
Media copy (enter auto print) MC ESC [ ? 5 i
Media copy (exit auto print) MC ESC [ ? 4 i
Media copy (enter printer controller) MC ESC [ 5 i
Media copy (exit printer controller) MC ESC [ 4 i
Media copy (print screen) MC ESC [ i
Media copy (print screen) MC ESC [ 0 i
Media copy (print cursor line) MC ESC [ ? 1 i
Reports
Name Mnemonic Sequence
Device status report (request status of printer) DSR ESC [ ? 15 n
Response: Printer ready DSR ESC [ ? 10 n
Response: Printer not ready DSR ESC [ ? 11 n
Response: No printer DSR ESC [ ? 13 n
Tests and Adjustments
Name Mnemonic Sequence
Invoke confidence test
(EIA modem control test. Requires test connector.)
DECTST ESC [ 2; 4 y
Invoke confidence test
(repeat EIA test continuously until failure or power-off. Requires test connector.)
DECTST ESC [ 2; 12 y
Invoke confidence test
(printer port data loopback test. Requires test connector.)
DECTST ESC [ 2; 16 y
Invoke confidence test
(repeat printer port data loopback test continuously until failure or power-off. Requires test connector.)
DECTST ESC [ 2; 24 y
Keyboard LEDs
Name Mnemonic Sequence
Load LEDs (L1 off) DECLL ESC [ q
Load LEDs (L1 off) DECLL ESC [ 0 q
Load LEDs (L1 on) DECLL ESC [ 1 q

VT52 Compatible Mode

Character Sets
Name Sequence
Special graphics character set ESC F*
Select US/UK character set (as determined by US/UK character SET-UP feature ESC G
* Same as special character and line drawing set in ANSI mode; same when sent from the terminal.
Print Commands
Name Sequence
Enter auto print mode ESC ^
Exit auto print mode ESC _
Enter printer controller mode ESC W
Exit printer controller mode ESC X
Print screen ESC ]
Print cursor line ESC V