The text of a manual · part 36 of 52
TE 2000 VT/ANSI Terminal Emulation Programmer's Guide: Chapter 6: Programming, pages 303 to 312
Pages 303 to 312 of 456, from TE 2000 VT/ANSI Terminal Emulation Programmer's Guide
The original document is the PDF (3.1 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.
For the Intermec 2425
Page 303
Chapter 6, Programming
Received Codes Received codes are codes the terminal receives from an application or host computer. The following pages describe received codes, and the action taken by the terminal when it receives the codes from an application or host.
Select C1 Controls Select C1 controls (code extension announcers) control the representation of C1 control codes returned to the application. The terminal supports select 7-bit and 8-bit C1 control transmission as shown in the following table. Note: The terminal does not support DECSCL sequences. Transmission
Sequence
Action
Select 7-bit C1 Control (S7C1T)
ESC sp F
Converts all C1 codes returned to the application to their equivalent 7-bit code extensions.
Select 8-bit C1 Control (S8C1T) (Ignored in VT100 and ANSI modes.)
ESC sp G
Returns C1 codes to the application without converting them to their equivalent 7-bit code extensions.
TE 2000™ VT/ANSI Terminal Emulation Programmer’s Guide
279
Page 304
Chapter 6, Programming
Terminal Modes A mode is one of several operating states used by the terminal. The following table lists selectable terminal modes and the action taken by the terminal in set mode and reset mode. Note: The last character of each reset mode sequence is lowercase L (6C hexadecimal). Selectable Terminal Modes Mode (Mnemonic)
Set Mode Reset Mode
Sequence
Action
Keyboard action (KAM)
Locked
CSI 2 h
Locks the keyboard for all following keystrokes.
Unlocked
CSI 2 l
Unlocks the keyboard.
Insert/Replace (IRM)
Insert
CSI 4 h
Selects insert mode. New display characters move old display characters to the right. Characters moved past the right margin are lost. Text moved into a protected character field is lost. If erasure mode (ERM) is reset, text moved into a protected character field is lost.
Replace
CSI 4 l
Selects replace mode. New display characters replace old display characters at cursor position. Old character is erased.
Off
CSI 1 2 h
Disables local echo. When the terminal sends characters to the host, the host must echo them back to the display.
On
CSI 1 2 l
Enables local echo. When the terminal sends characters, they are automatically sent to the display.
New line
CSI 2 0 h
Causes a received LF, FF, or VT code to move the cursor to the first column of the next line. “Return” sends both a CR and an LF code.
Line feed
CSI 2 0 l
Causes received LF, FF, or VT code to move cursor to the next line in the current column. “Return” sends a CR code only.
Cursor key (DECCKM)
Application
CSI ? 1 h
Causes cursor keys to send application control functions.
Cursor
CSI ? l l
Causes cursor keys to send ANSI cursor control sequences.
ANSI/VT52 (DECANM)
(None)
(None)
Not applicable.
VT52
CSI ? 2 l
Ignored.
Column (DECCOLM)
132 column
CSI ? 3 h
Ignored.
80 column
CSI ? 3 l
Selects 80 columns per line.
Scrolling (DECSCLM)
Smooth
CSI ? 4 h
Ignored.
Jump
CSI ? 4 l
Lets the terminal add lines to the display as fast as possible.
Screen (DECSCNM)
Reverse
CSI ? 5 h
Ignored.
Normal
CSI ? 5 l
Selects normal (light characters on a dark background).
Origin (DECOM)
Origin
CSI ? 6 h
Ignored.
Absolute
CSI ? 6 l
Ignored.
Send/Receive (SRM))
Line feed/New line (LNM)
280
TE 2000™ VT/ANSI Terminal Emulation Programmer’s Guide
Page 305
Chapter 6, Programming
Selectable Terminal Modes (continued) Mode (Mnemonic)
Set Mode Reset Mode
Sequence Action
Auto wrap (DECAWM)
On
CSI ? 7 h
Graphic display characters received when the cursor is at right margin appear on the next line. The display scrolls up if cursor is at end of the scrolling region.
Off
CSI ? 7 l
Graphic display characters received when cursor is at right margin replace previously displayed characters.
Auto repeat (DECARM)
On
CSI ? 8 h
Ignored.
Off
CSI ? 8 l
Ignored.
Print form feed (DECPFF)
On
CSI ? 18 h
Selects form feed (FF) as print termination character. The terminal sends this character to the printer after each print screen operation.
Off
CSI ? 18 l
Selects no termination character. The terminal does not send an FF to the printer after each print screen operation.
Print extent (DECPEX)
Full screen
CSI ? 19 h
Selects full screen to print during a print screen operation.
Scrolling region
CSI ? 19 l
Selects scrolling region to print during a print screen operation.
Text cursor enable (DECTCEM)
Visible
CSI ? 25 h
Makes the cursor visible.
Not visible
CSI ? 25 l
Makes the cursor not visible.
Keypad Application (DECKPAM/DECPNM) Numeric
ESC =
Keypad keys send application control functions.
ESC >
Keypad keys send characters that match the numeric, comma, period, and minus sign keys on main keypad. PF1-PF4 send control functions.
Character set (DECNRCM)
National
CSI ? 42 h
Ignored.
Multinational
CSI ? 42 l
Ignored.
Back arrow key mode (DECBKM)
Backspace
CSI ? 6 7 h The arrow key moves cursor back one space and deletes the character. It sends a BS character to the host.
Delete
CSI ? 6 7 l
The arrow key deletes the character at the cursor position. It sends a DEL character to the host.
TE 2000™ VT/ANSI Terminal Emulation Programmer’s Guide
281
Page 306
Chapter 6, Programming
Cursor Positioning The cursor indicates the position where the next character appears. The terminal supports all cursor positioning sequences as shown in the following table. Note: Pn is a variable, ASCII-coded, numeric parameter. Cursor Positioning Name (Mnemonic)
Sequence
Action
Cursor up (CUU)
CSI Pn A
Moves cursor up Pn lines in the same column. Cursor stops at top margin.
Cursor down (CUD)
CSI Pn B
Moves cursor down Pn lines in the same column. Cursor stops at bottom margin.
Cursor forward (CUF)
CSI Pn C
Moves cursor right Pn columns. Cursor stops at right margin.
Cursor backward (CUB)
CSI Pn D
Moves cursor left Pn columns. Cursor stops at left margin.
Cursor position (CUP)
CSI Pl ; Pc H
Moves cursor to Line P1, Column Pc.
Horizontal and vertical positions (HVP)
CSI Pl ; Pc f
Moves cursor to Line P1, Column Pc.
Index (IND)
ESC D
Is an 8-bit control character (84 hexadecimal) that can be expressed as an escape sequence for a 7-bit environment. IND moves the cursor down one line in the same column. If cursor is at bottom margin, display scrolls up.
Reverse index (RI)
ESC M
Is an 8-bit control character (8D hexadecimal) that can be expressed as an escape sequence for a 7-bit environment. RI moves the cursor up one line in the same column. If the cursor is at top margin, the display scrolls down.
Next line (NEL)
ESC E
Is an 8-bit control character (85 hexadecimal) that can be expressed as an escape sequence for a 7-bit environment. NEL moves the cursor to the first position on the next line. If the cursor is at bottom margin, the display scrolls up.
Save cursor (DECSC)
ESC 7
Saves the following into memory: cursor position, graphic rendition, character set shift state, state of wrap flag, state of origin mode, state of selective erase.
Restore cursor (DECRC) ESC 8
282
Restores the states described for DECSC. If none of these characteristics were saved the cursor moves to home position, origin mode is reset, no character attributes are assigned, and the default character set mapping is established.
TE 2000™ VT/ANSI Terminal Emulation Programmer’s Guide
Page 307
Chapter 6, Programming
Tab Stops Tab stops are selected based on the vertical column of the display. When the terminal receives a horizontal tab code (HT, 09 hexadecimal), the cursor tabs to the next tab stop. If no tab stops exist, the cursor tabs to the right margin. The terminal supports both tab stop sequences . The terminal supports “global” line tab stops only. It does not allow tab set and clear on every character on every line as for a VT/ANSI. Name (Mnemonic)
Sequence
Action
Horizontal tab set (HTS) ESC H
Sets a tab stop at the current column. HTS is an 8-bit control character (88 hexadecimal) that can also be expressed as an escape sequence when coding for a 7-bit environment.
Tabulation clear (TBC)
CSI g
Clears a horizontal tab stop at cursor position.
CSI 0 g
Clears a horizontal tab stop at cursor position.
CSI 3 g
Clears horizontal tab stops.
TE 2000™ VT/ANSI Terminal Emulation Programmer’s Guide
283
Page 308
Chapter 6, Programming
Character Rendition and Attributes Character rendition and attributes affect how a character is displayed, without changing the character. Select graphic rendition sequences change character rendition. The select character attribute sequence designates characters as erasable or non-erasable.
Select Graphic Rendition (SGR) The following table lists select graphic rendition sequences and the terminal action taken.
Graphic Rendition
Sequence and Ps (Single Parameter)
Action
All attributes off
CSI 0 m
Turns all attributes off.
Display bold
CSI 1 m
Translates bold to reverse video.
Display underscored
CSI 4 m
Displays underscored.
Display blinking
CSI 5 m
Ignored.
Display negative (reverse) image
CSI 7 m
Displays negative (reverse) image.
Display normal intensity
CSI 2 2 m
Displays normal intensity.
Display not underlined
CSI 2 4 m
Displays not underlined.
Display not blinking
CSI 2 5 m
Ignored.
Display positive image
CSI 2 7 m
Displays positive image.
Display black foreground*
CSI 30 m
Display black foreground
Display red foreground*
CSI 31 m
Display red foreground
Display green foreground*
CSI 32 m
Display green foreground
Display yellow foreground*
CSI 33 m
Display yellow foreground
Display blue foreground*
CSI 34 m
Display blue foreground
Display magenta foreground*
CSI 35 m
Display magenta foreground
Display cyan foreground*
CSI 36 m
Display cyan foreground
Display white foreground (default)*
CSI 37 m
Display white foreground
Display black background (default)*
CSI 40 m
Display black background
Display red background*
CSI 41 m
Display red background
Display green background*
CSI 42 m
Display green background
Display yellow background*
CSI 43 m
Display yellow background
Display blue background*
CSI 44 m
Display blue blackground
Display magenta background*
CSI 45 m
Display magenta background
Display cyan background*
CSI 46 m
Display cyan background
Display white background*
CSI 47 m
Display white background
* Supported on 700 Series, CK30, CK31, CV60 Terminals with color displays.
284
TE 2000™ VT/ANSI Terminal Emulation Programmer’s Guide
Page 309
Chapter 6, Programming
Select Character Attributes (DECSCA) The terminal ignores select character attributes. Character Attribute
Sequence and Ps
Action
All attributes off
CSI 0 I q
Ignored
Designate characters as non-erasable by DECSEL/DECSED
CSI 1 I q
Ignored
Designate character as erasable by DECSEL/DECSED
CSI 2 I q
Ignored
TE 2000™ VT/ANSI Terminal Emulation Programmer’s Guide
285
Page 310
Chapter 6, Programming
Line Attributes Line attributes affect an entire display line. The cursor selects the line affected by the attribute. It stays in the same character position when the attribute changes, unless the attribute would move the cursor past the right margin. In this case, the cursor stops at the right margin. When scrolling, the attribute moves with the line. Double-height line sequences make the line with the cursor the top or bottom half of a double-height, double-width line. The terminal ignores these sequences. Select Line Attributes Line Attribute
Half
Sequence
Action
Double-height, double-width
Top
ESC # 3
Ignored
Bottom
ESC # 4
Ignored
The terminal supports the single-width line. Single-Width Line Line Attribute
Sequence
Action
Single-width, single-height
ESC # 5
Makes the line with the cursor single-width, single-height. This is the line attribute for all new lines on the display.
Double-width line makes the line with the cursor double-width, singleheight. The terminal ignores this sequence. Double-Width Line
286
Line Attribute
Sequence
Action
Double-width, double-height
ESC # 6
Ignored
TE 2000™ VT/ANSI Terminal Emulation Programmer’s Guide
Page 311
Chapter 6, Programming
Erasure Mode Erasure mode (ERM) determines whether erasing functions (ECH, erase character; EL, erase in line; and ED, erase in display) can edit protected characters. The following table lists erasure mode sequences. Note: In edit mode (DECEDM), ERM affects editing functions IL, DL, ICH, and DCH. Mode
Sequence
Comments
Set
CSI 6 h
Erasing functions ECH, EL, and ED can affect all protected and unprotected characters.
Reset
CSI 6 l
Erasing functions ECH, EL, and ED can affect only unprotected characters.
The following table lists the erasing and editing functions that ERM affects. ERM also affects the independent style of character protection. Control Functions Affected by Character Protection Always Affected
Affected if Edit Mode (DECEDM) is Set
Erase character (ECH)
Insert character (ICH)
Erase in line (EL)
Insert line (IL)
Erase in display (ED)
Delete character (DCH) Delete line (DL)
TE 2000™ VT/ANSI Terminal Emulation Programmer’s Guide
287
Page 312
Chapter 6, Programming
Editing Editing sequences insert and delete characters and lines of characters at the cursor position. The position does not change when lines are inserted or deleted. The terminal supports all editing sequences. Note: Pn is a variable, ASCII-coded, numeric parameter. Name (Mnemonic)
Sequence
Action
Insert line (IL)
CSI Pn L
Inserts Pn lines at the cursor. If fewer than Pn lines remain from the current line to the end of the scrolling region, the number of lines inserted is the lesser number. Lines within the scrolling region at and below the cursor move down. Lines moved past bottom margin are lost. The cursor is reset to the first column. This sequence is ignored when the cursor is outside the scrolling region. In edit mode (DECEDM), if erasure mode (ERM) is reset, lines that move down into a line with a protected character field are lost.
Delete line (DL)
CSI Pn M
Deletes Pn lines, starting at the line with the cursor. If fewer than Pn lines remain from the current line to the end of the scrolling region, the number of lines deleted is the lesser number. As lines are deleted, the lines within the scrolling region and below the cursor move up, and blank lines are added at the bottom of the scrolling region. The cursor is reset to the first column. This sequence is ignored when the cursor is outside the scrolling region. In edit mode (DECEDM), if erasure mode (ERM) is reset, DL cannot delete lines that have protected characters. As lines are deleted, the area moved up is bounded by the bottom of the scrolling region, or by the next line with a protected character field.
Insert characters (ICH) (Applies only to ANSI, VT220, VT320, and VT340 modes. Is ignored in VT100 mode.)
CSI Pn @
Inserts Pn blank characters at the cursor position, with the character attributes set to normal. The cursor does not move and remains at the beginning of the inserted blank characters. A parameter of 0 or 1 inserts one blank character. Data on the line is shifted forward as in character insertion. In edit mode (DECEDM), if erasure mode (ERM) is reset, text moved into a protected character field is lost.
Delete character (DCH)
CSI Pn P
Deletes Pn characters, starting with the character at the cursor position. When a character is deleted, all characters to the right of the cursor move to the left. This creates a space character at the right margin for each character deleted. Character attributes move with the characters. Spaces created at the end of the line have all of their character attributes off. In edit mode (DECEDM), if erasure mode (ERM) is reset, DCH cannot delete protected characters.
288
TE 2000™ VT/ANSI Terminal Emulation Programmer’s Guide