1=  Win100 Copyright (c) 1989, 1990 by William S. Hall 3665 Benton Street, #66 Santa Clara, CA 95051 Win100 is a basic communications program for Microsoft Windows. Win100 features DEC * VT52 and VT100 capability in a simple-to-use application. The program can exchange text data with other applications and up to two instances of the program may be simultaneously in operation. Finally, any part of a session can be logged to a disk file. Although not all VT100 features, notably double wide and double high character sets, are implemented, some additional commands such as line and character insertion and deletion are available. Hence in the UNIX environment, Win100 can be used with a termcap entry of VT52, VT100, VT102, or VT132. A complete list of available commands is presented below. Win100 will run under both Windows 2.x and Windows 3.0. Operation The program requires no special installation other than to copy Win100.exe to the Windows directory. After the program runs, it reads win.ini for initialization parameters; if none are found, it selects default parameters and saves them to win.ini. The program then attempts to open the first communications port specified in win.ini. If the port is not available the second is tried. If neither is free then the program exits; otherwise, the emulator is ready to communicate. The terminal is basically 24 lines by 80 columns. On some low resolution displays, you will not be able to see all rows simultaneously. However, the row containing the flashing caret will always be visible; in fact, the window will position itself dynamically to maintain this visibility. The screen does not automatically scroll horizontally. However, if not all columns are visible, the horizontal scroll bar can be used to position the screen. If the window is resized, the horizontal position is reset. The terminal uses the Courier font. For best results, install all available Courier fonts to allow the greatest selection of sizes and quality, especially when using 132 column mode. You must use the Control Panel to install a font. First, use the Delete Font option under the Installation menu to view the fonts already present. If you are missing any of the Courier fonts which come with Windows, use the Install Font option in conjunction with your Windows distribution disks to add the remaining ones. Three menus are available which can be accessed with a mouse or by using Alt key sequences. If you are not familiar with the keyboard interface, please see your Windows manual. * DEC is a trademark of Digital Equipment Corporation, Inc Setup Options The user has a number of options, all of which can be saved as default values and which can be selected from the Setup menu item. However, be aware that some choices can be modified by the host using the terminal's command set (escape sequences). The commands are described in more detail below. Any set of selections can be saved to win.ini by checking the 'Save Settings' box on the dialog screens. Mini-Setup Figure 1 shows the options available under this menu item. When Line is selected, the keyboard and display are connected to the communications line; in Local mode, the output from the keyboard is routed to the screen. Local mode can be used to explore the command set to which the terminal responds. In addition, when in local mode, it is easy to view lines which may not be currently visible by using the home and arrow keys. The screen may be displayed in normal mode or the text and screen colors may be interchanged. Note that if you try to change the screen and background colors while the screen is reversed, the colors you select will also be interchanged. For example, if you select a white background and blue text when the screen is reversed, the text will be white and the screen blue. Scrolling may be smooth or jump a line at a time; however, smooth scrolling slows down the effective communication rate. Finally, either 80 or 132 columns may be chosen. In 132 column mode, the maximum number of visible characters will depend on the fonts available as well as the width of the window. Typically at most 128 columns will be seen on most displays. Modem Figure 2 shows the Modem dialog box, whose parameters determine the communications settings. Baud rate selections range from 110 to 19200. Parity and word size are lumped together for simplicity. Typical settings are 8 bits and no parity or 7 bits and even parity. Stop bits can be one or two; one stop bit is usual for baud rates over 110. Parity checking can be enabled. When a character having incorrect parity is received, a '?' will be displayed. This feature is useful when attempting to match the host's parity setting. The only flow control available is Xon-Xoff. The receiving buffer is 1024 bytes. When the buffer has 'Xoff Point' characters, an Xoff (control S) is sent to the host. When the buffer drops to 32 bytes, an Xon (control Q) is sent. The Xoff point can be set at any one of 5 values from 64 to 768. Connections can be made to either communications port 1 or port 2. In addition, it is possible to choose which of these will be tried first when the program loads. Note that the initial port selection is disabled if the 'Save Settings' box is not checked. Local echo should be used only if the remote host does not echo characters typed at the keyboard. For example, if Win100 is being used between two PC's then local echo should be set. Display Figure 3 shows the options available under this menu selection. The cursor can have either a block or underline style and can be blanked or displayed. In addition, the terminal can be set to wrap lines automatically during display or to add a linefeed character with every carriage return transmitted. Finally, a margin bell can be set to ring when the displayed text exceeds the 72nd column. General Figure 4 shows the possible choices for screen and text colors and emulation. In addition, the response to the bell character can be enabled or disabled. Note that you cannot choose the same color for both text and screen. An attempt to do so will force a selection of complementary colors. Keyboard Figure 5 shows the keyboard options. The behavior of the keyboard is quite close to a real VT100 or VT52. The actual keyboard layout is discussed in more detail later. Both the keypad and the cursor keys have two modes. The user can set the keypad to send numerical values or escape sequences. Similarly, the arrow key sequences can be chosen to send the usual cursor movement escapes or a special set. Most terminals have a separate delete key. The typical keyboard on a personal computer may have a delete key as well, but it usually does not transmit the delete character. However, a delete character can be sent if Ctrl-Backsapce is typed. You can interchange the rolls of Backspace and Ctrl-Backspace by selecting the appropriate option. The break key is assigned to function key F5. If the break key is enabled, F5 will send a short break to the host. Regardless of the break key setting, shift F5 will cause a long break (disconnect) to be executed. Finally, Ctrl-F5 transmits the contents of the Answerback message. In addition, if Auto Answer is checked, the receipt of ENQ (Ctrl-E) will also cause the Answerback message to be sent. Recall Saved Setup Permanently saved parameters can be recalled with this menu item. They are stored in win.ini. You may change their values by executing the 'Save' option in a dialog box or by directly editing win.ini. The former method is preferred since values are checked for validity. Clear Comm Port If the communications port appears to have become blocked, use this option to free it. The most common problem is the receipt of an Xoff character with no subsequent Xon. It is important to note that most versions of Windows 2.10 and Windows 2.11 have a communications driver which will does not handle XOFF-XON correctly. If you find that you must frequently clear the port, then you should obtain a new COMM.DRV from Microsoft and reinstall Windows. Edit Options Copy A range of lines displayed on the screen can be copied to the clipboard. The default is the entire screen (lines 1 to 24). A dialog box allows the user to change the range. Once transferred to the clipboard, the lines can be edited, printed, and /or saved to a file with any Windows editor. Paste In addition, the user can 'paste' text from another application. In reality, the text is transmitted to the host and echoed back, giving the illusion of having pasted the text directly into Win100. This technique can be used for limited file transfer to the host. Program function keys Some of the function keys (F1 to F12) can be loaded with user defined sequences. Not all keys are programmable since some are dedicated to sending special escape sequences or other uses. However, most are available when used in combination with the shift, control, or control and shift keys. You can record the entered string for each key by hitting return or by using the 'Save' button. A key can be cleared by clearing its entry and saving. When all desired keys have been programmed, press 'Quit'. Any printable character can be placed into a string. Control characters can also be entered by prefixing each with a '$' symbol. Thus, $M (or $m) is a carriage return , $J ($j) is a line feed, and $[ is escape, $$ provides the '$' character itself. Session Logging All or part of a session can be logged to a file. The default file name is Win100.log. Unless the user provides a full path name, the log file will be created in the current directory. All incoming text will be written to the file until it is closed. If a logging file is reopened, you may choose to append additional text to the current contents or to empty the file and begin anew. Certain cautions should be observed when logging a session. If you are running two instances of Win100, then you must be careful not to attempt to log both sessions to the same file. And, if you are logging to a floppy disk file, then do not removed the disk until the file is closed. Keyboard Every effort has been made to emulate the DEC VT100 class keyboard. In particular, the keypad has been designed to function in two modes which depend on the setting of the Num-Lock key. When depressed, the keypad actions are quite similar to the numeric/application mode of the VT100. Hence, if in numeric mode, the keypad transmits numbers; otherwise, it sends escape sequences appropriate to the emulation mode. The keypad does not transmit the standard cursor movement sequences. However, on an Enhanced (101) keyboard, the additional arrow keys and home key function as does a VT52/VT100. When Num-Lock is released, then the keypad transmits the usual VT52/VT100 arrow key sequences. The home key also sends the correct VT52/VT100 sequence. Delete can be sent using Ctrl-Backspace. Ctrl-Enter will send a line feed. Scroll-Lock can be used to start and stop screen display. Function keys F1 - F4 act just as the PF1 - PF4 keys on a VT52/VT100. F-6 to F-9, F11, and F12 are programmable. Finally, except for F5 (break key) and F10 (secondary ALT key), all shift, control, and control-shift combinations can be programmed. Function and arrow/home key sequences are as follows. Those in parenthesis apply when in application cursor key mode. Key VT100 VT52 F1 ESC [ P ESC P F2 ESC [ Q ESC Q F3 ESC [ R ESC R F4 ESC [ S ESC S Up ESC [ A (ESC O A) ESC A Down ESC [ B (ESC O B) ESC B Right ESC [ C (ESC O C) ESC C Left ESC [ D (ESC O D) ESC D Home ESC [ H (ESC O H) ESC H Keypad sequences in application mode are given below. Key VT100 VT52 0 ESC O p ESC ? p 1 ESC O q ESC ? q 2 ESC O r ESC ? r 3 ESC O s ESC ? s 4 ESC O t ESC ? t 5 ESC O u ESC ? u 6 ESC O v ESC ? v 7 ESC O w ESC ? w 8 ESC O x ESC ? x 9 ESC O y ESC ? y + ESC O l ESC ? l - ESC O m ESC ? m * ESC O M ESC ? M Terminal Commands Win100 recognizes those VT100/102/220 escape sequences which generate the commands listed below. The symbol Pn represents an optional string of decimal digits. If absent or 0 then the default value is 1. For example, ESC [ A, ESC [ 1 A, and ESC [ 0 A all move the cursor up 1 line. Note also that mode commands or video commands can be combined if the selective parameter is separated by semicolons. For example, ESC [ ? 4 ; 5 h is the same as ESC [ ? 4 h followed by ESC [ ? 5 h. Command VT100 VT52 Cursor Commands Cursor home ESC [ H ESC H ESC [ 0;0 H ESC [ 1;1 H ESC [ f ESC [ 0;0 f ESC [ 1;1 f Cursor up ESC [ Pn A ESC A Cursor down ESC [ Pn B ESC B Cursor right ESC [ Pn C ESC C Cursor left ESC [ Pn D ESC D Cursor addressing (1) ESC [ r;c H ESC Y r c ESC [ r;c f Cursor index ESC D Reverse cursor left ESC M ESC I Next line ESC E Save cursor ESC 7 Restore cursor ESC 8 Mode Commands Insert character mode ESC [ 4 h Replace character mode ESC [ 4 l Local Echo ESC [ 12 h Local Echo off ESC [ 12 l Newline mode ESC [ 20 h Newline mode off ESC [ 20 l Cursor key application mode ESC [ ? 1 h Cursor key normal mode ESC [ ? 1 l VT52 mode ESC [ ? 2 l VT100 mode ESC < 132 columns ESC [ ? 3 h 80 columns ESC [ ? 3 l Smooth scroll ESC [ ? 4 h Jump scroll ESC [ ? 4 l Reverse video ESC [ ? 5 h Normal video ESC [ ? 5 l Word wrap ESC [ ? 7 h No word wrap ESC [ ? 7 l Text cursor enabled ESC [ ? 25 h Text cursor off ESC [ ? 25 l Erase Commands Cursor to end of line ESC [ K ESC K ESC [ 0 K Start of line to cursor ESC [ 1 K Entire line ESC [ 2 K Cursor to end of page ESC [ J ESC J ESC [ 0 J Beginning of page to cursor ESC [ 1 J Entire page ESC [ 2 J Insert line at cursor ESC [ Pn L Delete cursor line ESC [ Pn M Delete character ESC [ Pn P Video Commands Video attributes off ESC [ m ESC [ 0 m Underline ESC [ 4 m Reverse ESC [ 7 m Not underline ESC [ 24 m Not reverse ESC [ 27 m Miscellaneous Commands Primary Terminal ID ESC [ c ESC Z ESC [ 0 c Set tab ESC H Clear tab current position ESC [ 0 g Clear all tabs ESC [ 3 g Read cursor location ESC [ 6 n Read terminal condition ESC [ 5 n Enter application keypad ESC = Exit application keypad ESC > Align screen ESC # 8 Display character set ESC # 7 (1) In VT100 mode r and c are row and column numbers expressed as a string of digits. In VT52 mode, r and c are single characters whose ASCII value represent the row and column number offset by 32. Win100 does not recognize the following VT100/102/220 commands: Lock/Unlock keyboard Selective erase in line or page Bold, blinking, or dim text Double width/height characters Printer commands Special character sets Text paging Eight bit controls VT52 F1 ESC [ P ESC P F2 ESC wrnjfb7^=Z5V;RNJ@ ws oNkXg c _ [ W S O K w|sodkjgc_[KWTSOK 5w7s1oIkdgucO!_n!["W"Se#Ok#K k##w#s&o&k>'gI'c(_([)W)S)O.K ..w0sU0oh0k1g1c1_1[3W3T3P%5L %5,5y75u95s5o5m5i5g5c5_Q8[U8Wc8S9O 99w:s:o:k;g;c;_<[<W=SU8Wc8S9O iWEB????=U<<<<<< NyPyyyyvv ttttttt t t t t t<<< y y y y y v t t q q oO oQ o o o o oo <<<<<yyyyy~yyyyyyLyyyyyyyyy<yyyIyKyTyVyyyyyByDy7y9yyy1y3yGy<GIyaybydyuywyy* y, y y7!yO!yQ!y_!va!tg!ti!t"t"tG<<<""y"y#y#y#y#y$y$y%y%y&y&y&y&v&t't't~(t(tG<<<()y)v)v)t,t,t,t,t-t-t@.tB.t.t.t.t.t /t-/tN/tG<<<N/s/y/y/y/y0y0y0yR0yT0yh0y~0y0y0y0y0y0y1y1y.1yD1y<D1[1yq1y1y1y1v1t3t3t3t3t3t3t3t 4t4t/4tU4t4t4tD1<<<44y'5y95yP5y5y5y5y5y5y5y5y5y 6y:6yX6yt6y6y6y6y6y<6+7yG7yb7y7y7y7y7y7y8y28yS8yU8ye8y8y8y8y8y$9y49y\9y<\9v9y9y9y9y9y9y :y:y4:yJ:yg:y:y:y:y:y:y:y:y;y,;y<,;N;ys;y;y;y;y;y;y;y<y<y=y=y=y?=y]=y~=y=y=y=y=y<==ys;y;y;y;y;y;y;y<y<y=y=y=y?=y]=y~=y=y=y=y=y<f=/2!898( Clear tab current positiM=IN= tabs ESC [ 3 g Read cursor location ESC [ 6 n Read terminal condition ESC [ 5 n Enter applica  `Y&/I5: Align screen ESC # 8 Display character set ESC # 7 (1) In VT100  Helv 0Courierd column numbers expressed as a string of digits. In VT52 mode, r and c are single characters whose ASC