The text of a manual · part 23 of 33
TE 2000 VT/ANSI Terminal Emulation Programmer's Guide: Section 6: Programming, pages 185 to 194
Pages 185 to 194 of 278, from TE 2000 VT/ANSI Terminal Emulation Programmer's Guide
The original document is the PDF (4.0 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 6400
Page 185
SECTION 6
Programming
Table 6-12 (Continued) Selectable Terminal Modes Mode (Mnemonic) Auto repeat (DECARM) Print form feed (DECPFF)
Print extent (DECPEX) Text cursor enable (DECTCEM) Keypad (DECKPAM/ DECPNM)
Set Mode Reset Mode On
Sequence Action CSI ? 8 h Ignored.
Off
CSI ? 8 l
Ignored.
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.
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.
Visible
CSI ? 25 h
Makes the cursor visible.
Not visible
CSI ? 25 l
Makes the cursor not visible.
Application
ESC =
Keypad keys send application control functions.
Numeric
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 National CSI ? 42 h (DECNRCM) Multinational CSI ? 42 l Back arrow key mode (DECBKM)
Ignored. Ignored.
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 2000t VT/ANSI Terminal Emulation Programmer’s Guide
6-11
Page 186
SECTION 6
Programming
Cursor Positioning The cursor indicates the position where the next character appears. The terminal supports all cursor positioning sequences (Table 6-13). " NOTE:
Pn is a variable, ASCII-coded, numeric parameter. Table 6-13 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
6-12
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 2000t VT/ANSI Terminal Emulation Programmer’s Guide
Page 187
SECTION 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 (Table 6-14). 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. Table 6-14 Tab Stops 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.
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) Table 6-15 lists select graphic rendition sequences and the terminal action taken. Table 6-15 Select Graphic Rendition 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.
TE 2000t VT/ANSI Terminal Emulation Programmer’s Guide
6-13
Page 188
SECTION 6
Programming
Select Character Attributes (DECSCA) The terminal ignores select character attributes (Table 6-16). Table 6-16 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
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 (Table 6-17). Table 6-17 Select Character 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 (Table 6-18). Table 6-18 Single-Width Line Line Attribute
Sequence Action
Single-width, single-height
ESC # 5
Makes the line with the cursor singlewidth, 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, single-height. The terminal ignores this sequence (Table 6-19). Table 6-19 Double-Width Line
6-14
Line Attribute
Sequence Action
Double-width, double-height
ESC # 6
TE 2000t VT/ANSI Terminal Emulation Programmer’s Guide
Ignored
Page 189
SECTION 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. Table 6-20 lists erasure mode sequences. " NOTE:
In edit mode (DECEDM), ERM affects editing functions IL, DL, ICH, and DCH. Table 6-20 Erasure Mode
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.
Table 6-21 lists the erasing and editing functions that ERM affects. ERM also affects the independent style of character protection. Table 6-21 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 2000t VT/ANSI Terminal Emulation Programmer’s Guide
6-15
Page 190
SECTION 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 (Table 6-22). " NOTE:
Pn is a variable, ASCII-coded, numeric parameter. Table 6-22 Editing
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.
6-16
TE 2000t VT/ANSI Terminal Emulation Programmer’s Guide
Page 191
SECTION 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. Table 6-23 lists erasing sequences and the action taken by the terminal. Table 6-23 Erasing 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, singlewidth 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.
CSI ? K CSI ? 0 K CSI ? 1 K CSI ? 2 K
Ignored by the terminal.
Selective erase in display CSI ? J (DECSED) CSI ? 0 J CSI ? 1 J CSI ? 2 J
Ignored by the terminal.
Selective erase in line (DECSEL)
TE 2000t VT/ANSI Terminal Emulation Programmer’s Guide
6-17
Page 192
SECTION 6
Programming
Scrolling Margins (Top and Bottom) The scrolling region is the area of the terminal’s display that can receive new characters by scrolling old characters off the display. The area is defined by the top and bottom display margins (Table 6-24). The smallest scrolling region allowed is two lines. The number of the top margin must be at least one less than the number of the bottom margin. Table 6-24 Scrolling Margins (Top and Bottom) Name (Mnemonic)
Sequence
Action
Set top and bottom margins (DECSTBM)
CSI Pt ; Pb r Sets top and bottom scrolling margins. The value of Pt must be less than Pb. Moves the cursor to Column 1, Line 1 of the page.
Printing Select print operations (Table 6-25) with control sequences. When characters are printed on the screen, printer tab stops are ignored. Print characters are spaced with the SP character. The terminal sends a carriage return and line feed, vertical tab, or form feed after the last printable character on a line (not a space character). " NOTE:
The terminal ignores printer port DSR exchanges. Table 6-25 Printing
Name (Mnemonic)
Sequence
Action
Auto print mode
CSI ? 5 i
Turns on auto print mode. Display lines print when you move the cursor off the line with a line feed, form feed, vertical tab, or auto wrap. The printed line ends with a carriage return and the character that moved the cursor off the previous line (LF, FF, or VT). Auto wrap lines end with a line feed.
CSI ? 4 i
Turns off auto print mode.
CSI 5 i
Turns on printer controller mode. The terminal sends received characters to the printer without displaying them on the screen. All characters and character sequences except NUL, XON, XOFF, CSI 5 i, and CSI 4 i are sent to the printer. The terminal does not insert or delete spaces, provide line delimiters, or select the correct printer character set. Keyboard activity is still directed to the host.
CSI 4 i
Turns off printer controller mode.
Print cursor line
CSI ? l i
Prints the data on the display line with the cursor. Cursor position does not change. Print-cursor-line sequence is complete when the line prints. No CR/LF is attached to the line.
Print screen
CSI i
Prints the screen display (full screen or scrolling region, depending on the print extent DECPEX selection). Printer form feed mode (DECPFF) selects either a form feed (FF) or nothing as the print terminator. Print screen sequence is complete when the screen prints.
CSI 0 i
Same as CSI i.
Printer controller
6-18
TE 2000t VT/ANSI Terminal Emulation Programmer’s Guide
Page 193
Page 194
SECTION 6
Programming
Programming UDKs Use the following Device Control String (DCS) format to load UDK definitions from the host. DCS
Pc ; Pl
|
Ky1/St1;}Kyn/Stn
ST
Device control string introducer
Clear and lock parameters
Final character
Key definition string
String terminator
DCS indicates the beginning of a device control string. DCS is an 8-bit C1 character (90 hexadecimal ). You can use ESC P (1B and 50 hexadecimals) for a 7-bit environment. Pc is the clear parameter that selects how to clear key definitions. Pc
Meaning
0 (default) or none 1
Clear all keys before loading new values. Clear one key at a time, before loading a new value.
When Pc is 1, the terminal only clears the keys you are loading. By using a Pc value of 1, you can redefine some keys without redefining them all. " NOTE:
There are 256 bytes of memory for all UDKs. A key definition can only use the number of bytes available when that key is loaded.
If Pc is 1, a key load may fail because no memory space is available. The reason for this is, with Pc set to 1, keys are cleared and loaded sequentially. If the new definition for a key is larger than the old one you may exceed the 256-byte limit. EXAMPLE:
Suppose F6 contains 120 bytes, F7 contains 110 bytes, and F8 contains 20 bytes. You try to load F8 with 40 bytes, F6 with 1 byte, and F7 with 1 byte, in that order. This works if all keys are cleared first (Pc is 0), but not if keys are cleared one at a time (Pc is 1). When you try to load F8 with 40 bytes, the load fails because only 26 bytes are free at that time. (256 maximum, 120 in F6, 110 in F7 = 26.)
Pl is the lock parameter. Pl determines whether the key definitions are locked or unlocked after you load them. Pl
Meaning
0
Lock the keys. If you want to load new values into the keys, you must unlock the keys through the terminal’s firmware menus. Do not lock the keys. The keys are unlocked and can be redefined with another DECUDK string.
1 (default) or none " NOTE:
If Pl is 1 and the keys are already locked, nothing happens. The terminal ignores UDK DSR exchanges.
The terminal uses a special lock to allow or prevent the programming of UDKs. You can turn on this lock through the terminal’s firmware menus or from the host (with a DECUDK device control string). The lock affects all programmable keys. When using the lock follow these guidelines: " Unlock the keys to define them. The keys must be unlocked before you can define them. You can only unlock the keys through the terminal’s firmware menus. If a key is locked and an application tries to redefine the key with a DECUDK sequence, the terminal ignores the sequence. " Lock the keys to prevent redefinition. You can lock the keys through the terminal’s firmware menus or from the host (with a DECUDK sequence). New key definitions are unlocked by default. 6-20
TE 2000t VT/ANSI Terminal Emulation Programmer’s Guide