Browse
(440) 299-7778
Menu
(440) 299-7778
One-year parts and labor warranty30-day money-back guaranteeEnglishEspañolContact

The text of a manual · part 31 of 47

TE 2000 VT/ANSI Terminal Emulation Programmer's Guide: Chapter 6: Programming, pages 269 to 278

Pages 269 to 278 of 416, from TE 2000 VT/ANSI Terminal Emulation Programmer's Guide

The original document is the PDF (3.6 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 2435

Page 269

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

245

Page 270

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)

246

TE 2000 VT/ANSI Terminal Emulation Programmer’s Guide

Page 271

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

247

Page 272

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

248

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 273

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

249

Page 274

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.

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

250

TE 2000 VT/ANSI Terminal Emulation Programmer’s Guide

Page 275

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 Line Attribute

Sequence

Action

Double-width, double-height

ESC # 6

Ignored

TE 2000 VT/ANSI Terminal Emulation Programmer’s Guide

251

Page 276

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

252

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

Page 277

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.

TE 2000 VT/ANSI Terminal Emulation Programmer’s Guide

253

Page 278

Chapter 6, Programming

Erasing Erasing deletes characters in the terminal’s display without affecting other characters. Erased characters are lost. Cursor positioning does not change when characters or lines are erased. The following table lists erasing sequences and the action taken by the terminal. Name (Mnemonic)

Sequence

Action

Erase character (ECH) (Applies only to ANSI, VT220, VT320, and VT340 modes. Is ignored in VT100 mode.)

CSI Pn X

Erases characters at the cursor position and the next Pn-1 character. A parameter of 0 or 1 erases a single character. Character attributes are set to normal. No reformatting of data on the line occurs. The cursor remains in the same position. If erasure mode (ERM) is reset, ECH cannot erase protected characters.

Erase in line (EL)

CSI K

Erases from the cursor to the end of the line, including the cursor position. Line attribute is not affected. If erasure mode (ERM) is reset, EL cannot erase protected characters.

CSI 0 K

Same as CSI K.

CSI l K

Erases from the beginning of the line to the cursor, including the cursor position. Line attribute is not affected.

CSI 2 K

Erases the complete line.

Erase in display (ED)

CSI J

Erases from cursor to the end of display, including the cursor position. Line attribute is single-height, single-width for all completely erased lines. If erasure mode (ERM) is set, ED cannot erase protected character positions.

Erase in display (ED)

CSI 0 J

Same as CSI J.

CSI 1 J

Erases from the beginning of the display to the cursor, including the cursor position. Line attribute becomes single-height, single-width for all completely erased lines.

CSI 2 J

Erases complete display. All lines are erased and changed to single-width. The cursor does not move.

Selective erase in line (DECSEL)

CSI ? K CSI ? 0 K CSI ? 1 K CSI ? 2 K

Ignored by the terminal.

Selective erase in display (DECSED)

CSI ? J CSI ? 0 J CSI ? 1 J CSI ? 2 J

Ignored by the terminal.

254

TE 2000 VT/ANSI Terminal Emulation Programmer’s Guide