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 37 of 52

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

Pages 313 to 322 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 313

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.

TE 2000™ VT/ANSI Terminal Emulation Programmer’s Guide

289

Page 314

Chapter 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. 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. 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 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. 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

290

TE 2000™ VT/ANSI Terminal Emulation Programmer’s Guide

Page 315

Chapter 6, Programming

User-Defined Keys (DECUDK) Note: The DECUDK command is ignored in VT100 mode. The terminal has 20 user-defined keys (UDKs). You can define the codes of 15 of these keys. The keys are F6 through F14, F15 (Help), F16 (Do), and F17 through F20. Use UDKs to store and recall text and commands that you often use with applications. You should refer to your application’s software manual for the commands you can store in user-defined keys. If you use dual sessions, you can define UDKs for each session. However, you can only save one set of UDK definitions. For each session you can use a total of 256 characters to define UDKs.

Using UDKs To enter definitions for the 15 UDKs, you program the definitions with DECUDK device control strings. To use a UDK after you have defined it, the terminal must be in caps lock mode. For example, if you defined the [F6] key, you can use it by pressing the caps lock key for the terminal and then the key sequence for the [F6] key. The following chart shows key combinations for CAPS lock. Note the host system can also define the function keys. Terminal

Key Sequence

2415

( U (55-key keyboard) ( G (37-key numeric keyboard) ( (37-key alphanumeric keyboard)

2425, 2455

)Z

2435A l r (57-key and 37-key function numeric keyboards) [Orange] > [Green] > (48-key keyboard)

2475, 248X

) [quotation mark]

6400

[Blue] [space] (41-key keyboard); not supported on 51-key keyboards

5020 u + function key

5055

[Caps Lock] on the external keyboard

59XX

Not supported

11XX, 17XX

[Black] [Gold]

700 Series

F 1 (700 Series Numeric Keypad) F g (700 Color Alphanumeric Keypad)

CK30

[Orange] B [Shift] (52-key keyboard) [Func] [Shift] (50-key keyboard) [Orange] B [A] (42-key keyboard)

CK31

[Orange] B [Shift] (52-key keyboard)

CV60

[Caps Lock]

TE 2000™ VT/ANSI Terminal Emulation Programmer’s Guide

291

Page 316

Chapter 6, Programming

UDK Memory Space There are 256 bytes of memory space available for the 15 UDKs. Space is supplied on a first-come, first-serve basis. When the 256 bytes are full you cannot define any more keys until you clear some of the memory space. Three ways that you can clear space are: S Redefine one or more UDKs by using a DECUDK control string. S Clear one or more UDKs by using a DECUDK control string. S Clear all UDKs with a terminal power-up or hard terminal reset (RIS) operation. Note that all UDK key definitions are lost when power is lost.

Programming UDKs Use the following Device Control String (DCS) format to load UDK definitions from the host. DCS

Pc ; Pl

Device control Clear and lock string introducer parameters

|

Ky1/St1;…Kyn/Stn ST

Final Key definition string character

String terminator

S 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. S Pc is the clear parameter that selects how to clear key definitions. Pc

Meaning

0 (default) or none Clear all keys before loading new values. 1

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.

292

TE 2000™ VT/ANSI Terminal Emulation Programmer’s Guide

Page 317

Chapter 6, Programming

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.

1 (default) or none

Do not lock the keys. Keys are unlocked and can be redefined with another DECUDK string.

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: S 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. S 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. The vertical bar (|, 7C hexadecimal) is the final character. It identifies this control string as a DECUDK. Ky1/St1;…Kyn/Stn are the key definition strings. You include these strings between the final character (|) and the string terminator (ST). Each string consists of a key selector number (Kyn) and a string parameter (Stn), separated by a slash (/, 2F hexadecimal). A semicolon (3B hexadecimal) separates different strings.

TE 2000™ VT/ANSI Terminal Emulation Programmer’s Guide

293

Page 318

Chapter 6, Programming

The key selector number (Kyn) indicates which key you are defining. Following is a list of definable keys and their identifying values. Key

Value

Key

Value

F6

17

F13

25

F7

18

F14

26

F8

19

Help

28

F9

20

Do

29

F10

21

F17

31

F11

23

F18

32

F12

24

F19

33

F13

25

F20

34

F14

26

String parameters (Stn) are the encoded definition of the keys. String parameters consist of hex pairs in the following ranges: S 30 through 39 hexadecimal (0 through 9) S 41 through 46 hexadecimal (A through F) S 61 through 66 hexadecimal (a through f) When you combine these hexadecimal values they represent an 8-bit quantity. This method lets you use any of the 256 character codes in the key string. You can enter key definition strings in any order. The default for Stn is “empty.” The key is undefined. ST is the string terminator. ST (9C hexadecimal) is a C1 8-bit character. You can use ESC \ (1B and 5C hexadecimals) for a 7-bit environment.

Loading UDKs Following are some guidelines for loading UDKs. S Clear UDK memory space before loading new definitions. Use a DECUDK string to clear keys without locking them. Then you can use another DECUDK string to redefine the keys and lock them. S If you redefine a key, the old definition is lost. This may clear some space if the new definition uses fewer bytes than the old one. S There are two ways to lock UDKs, but only one way to unlock them. To lock UDKs, you can use either the terminal’s firmware menus or a DECUDK control string. To unlock UDKs, you must use the terminal’s firmware menus. S The default value for each key definition is empty. When you clear UDKs, they are empty. S An invalid hex pair in a DECUDK string is ignored.

294

TE 2000™ VT/ANSI Terminal Emulation Programmer’s Guide

Page 319

Chapter 6, Programming

Examples of Device Control Strings This sequence clears UDKs: DCS 0 ; 1 | ST

This sequence locks UDKs: DCS 1 ; 0 | ST

Suppose you want to define the F20 key to be PRINT without clearing or locking any other keys and you are using 8-bit mode. The first part of the sequence would look like this: É1;1|34/ where 34 is the code for the F20 key and “É” is the ASCII character for 90 hexadecimal. After the slash character “/” (2F hexadecimal) you would include the definition. The rest of the sequence after the slash character would be, 5052494E54£ where the hex encoding for PRINT is: 50 = P 52 = R 49 = I 4E = N 54 = T The ST ASCII character “£” (9C hexadecimal) marks the end of the control string. The complete string is: É1;1|34/5052494E54£

Down-Line Loadable Character Set The terminal does not support the ability to create and down-line load a character set of up to 94 characters. This character set is also called a dynamically redefinable character set (DRCS). Function

Action

Down-line load DRCS characters

Ignored

Clear a down-line loaded character set

Ignored

TE 2000™ VT/ANSI Terminal Emulation Programmer’s Guide

295

Page 320

Chapter 6, Programming

Reports The terminal sends reports in response to host computer requests. Reports provide identification (type of terminal). Two categories of reports are available: primary/secondary device attributes, and device status reports.

Device Attributes (DA) The following table shows the action taken by the terminal when it receives primary and secondary device attribute exchanges. During a primary exchange, the host asks for the terminal’s service class code. The terminal responds with “I am a service class 2 terminal.” During a secondary exchange the terminal responds with “I am a VT (identification code of 1) family terminal.” Communication

DA Exchange

Sequence

Meaning

Host to VT220 (request)

Primary

CSI > c or CSI > 0 c

What type of terminal are you?

Secondary

CSI c or CSI 0 c

What type of terminal are you?

VT220 to host (response)

Primary

CSI > c

I am a VT100 Terminal

CSI > 1 c

I am a VT220 Terminal.

CSI > 24 c

I am a VT320 Terminal.

CSI > 19 c

I am a VT100 Terminal.

CSI ? 61 c

I am a VT100 Terminal.

CSI ? 62 ; 8 ; 9 c

I am a VT220 Terminal supporting user-defined keys and national replacement character sets.

CSI ? 63 ; 8 ; 9 c

I am a VT320 Terminal supporting user-defined keys and national replacement character sets.

CSI ? 63 ; 8 ; 9 ; 13 c

I am a VT340 Terminal supporting user-defined keys, national replacement character sets, and local editing.

Secondary

296

TE 2000™ VT/ANSI Terminal Emulation Programmer’s Guide

Page 321

Chapter 6, Programming

Device Status Reports (DSR) The following table shows the action taken by the terminal when it receives device status report exchanges, when the host computer asks for the general operating status of the terminal or printer, or both. If the terminal is in printer controller mode, the printer receives the DSR request but cannot answer. DSR Exchange

Communication

Sequence

Action

VT220

Host to VT220 (Request for status)

CSI 5 n

Ignores this code.

VT220 to host (DA response)

CSI 0 n or CSI 3 n Ignores these codes.

Host to VT220 (Request for cursor position)

CSI 6 n

“Please report your cursor position using a CPR (not DSR) control sequence.”

VT220 to host (CPR response)

CSI Pv; Ph R

“My cursor is positioned at _____ (Pv); _____ (Ph).” (Pv=row, Ph=column)

Request for printer status

CSI ? 15 n

What is the printer status?

Response

CSI ? 13 n

No printer.

Request for UDK status

CSI ? 25 n

Ignored in VT100 mode.

Response

CSI ? 20 n

UDKs are unlocked.

CSI ? 21 n

UDKs are locked.

Printer port User-defined keys

Keyboard language Request for keyboard language CSI ? 26 n Response

CSI ? 27; Pn n

What is the keyboard language? North American keyboard dialect.

Identification The terminal supports the identification sequence. Name (Mnemonic)

Sequence

Action

Identification (DECID)

ESC Z

Ignored

TE 2000™ VT/ANSI Terminal Emulation Programmer’s Guide

297

Page 322

Chapter 6, Programming

Terminal Reset Terminal reset escape sequences cause either a soft terminal reset or a hard terminal reset.

Soft Terminal Reset (DECSTR) Note: The DECSTR control function is available for all VT/ANSI modes. DECSTR changes most of the terminal’s current settings to the power-up default settings listed in the following table. The escape sequence is: CSI ! p

DECSTR affects only those functions listed in the following table. Soft Terminal Reset (DECSTR) States Mode

Mnemonic

State After DECSTR

Text cursor enable

DECTCEM

Cursor enabled.

Insert/replace

IRM

Replace. (“Insert” if local editing mode.)

Origin

DECOM

Absolute (cursor origin at upper-left of screen).

Auto wrap

DECAWM

No auto wrap.

Keyboard action

KAM

Unlocked.

Numeric Keypad

DECNKM

Numeric characters.

Cursor keys

DECCKM

Normal (arrow keys).

Edit

DECEDM

Interactive.

Transmit execution

DECTEM

Immediate.

Erasure

ERM

All characters.

Guarded area transfer

GATM

All characters.

Multiple area transfer

MATM

All selected areas.

Selected area transfer

SATM

All areas.

Scanner lock

298

Reset.

TE 2000™ VT/ANSI Terminal Emulation Programmer’s Guide