APPENDIX  A     VIRTUAL TERMINAL
VT.EXE is a terminal evaluation program which is used to let your PC to active like a VT52 terminal. Either the virtual terminal features and file transfer features are available in VT.EXE software, moreover some extended graphics capability are also supported.

A.1 Valid Control Sequence of VT
VT.EXE supports part of VT52 control sequence which are list in the following.

1. Cursor up                                                                                                     code= ESC A
Move the active position upward one position.

2. Cursor down                                                                                                code= ESC B
Move the active position downward one position.

3. Cursor right                                                                                                  code= ESC C
Move the active position to the right.

4. Cursor left                                                                                                    code= ESC D
Move the active position to the left.

5. Cursor to home                                                                                           code= ESC H
Move the cursor to the home position.

6. Reverse line feed                                                                                          code= ESC I
Move the active position upward one position without altering the column position. If the active position is at the top margin, a scroll down is performed.

7. Erase to end of screen                                                                                code= ESC J
Erase all characters from the active position to the end of screen.

8. Erase to end of line                                                                                     code= ESC K
Erase all characters from the active position to the end of the current line.

9. Direct cursor address                                                                      code= ESC Y lin col
Move the cursor to the specified line (lin) and column (col).
Back
A.2 Extended Graphics Capability
VT.EXE provides extended graphics capability which may accept a  sequence of graphics control code (which is represented by ASCII code) to draw a line, circle, ellipse ... etc. on the display monitor. The graphics functions can be used under EGA, VGA, hercules, and 8514 modes or other display mode that supported by turbo C graphics tools. The control sequence of these graphics primitives are list in the following.

1. Enter graphics mode                                                                                  code= ESC P
When VT.EXE accepts ESC P, then the terminal evaluator enter to graphics mode to ready accept graphics operation commands. The resolution of graphics mode depend on your PC monitor and adapter type which is detected by VT.EXE automatically.

2. Exit from graphics mode to text mode                                                               code= Q
When terminal evaluator is at graphics mode, it can accept Q to enter text mode.

3. Move cursor to X,Y position                                                              code= Mxxxxxyyyyy
Move to (xxxxx,yyyyy) position. Where xxxxx represents X coordinate, which length is  five  digit. yyyyy represents Y coordinate, which length is five digit.

4. Draw to X,Y position                                                                           code= Dxxxxxyyyyy
From current position draw to (xxxxx,yyyyy) position.

5. Draw a line                                                                     code= Lxxxxxyyyyywwwwwzzzzz
Draw a line from (xxxxx,yyyyy) to (wwwww,zzzzz).

6. Draw a circle                                                                                 code= Cxxxxxyyyyyrrrrr
Draw a circle whose center is (xxxxx,yyyyy) and its radius is rrrrr.

7. Draw ellipse                                                                        code= Exxxxxyyyyyrrrrrsssss
Draw a ellipse whose center is at (xxxxx,yyyyy), and the length of semi-major axis is rrrrr, the length of semi-minor axis is sssss.

8. Draw a point                                                                                        code= Pxxxxxyyyyy
Draw a point at (xxxxx,yyyyy).

9. Write a string                                                                                    code= Sccccc<CR>
Draw a graphics string on the screen, the string are quoted between S and <CR>. The maximum string length is 80 characters.

10. Select one color attribute                                                                          code= Axxxxx
Select pen color, the color number is specified by xxxxx, where xxxxx has five digit length.

We will give some example to show graphics ability in the section A.4.
Back
A.3 How to Execute VT.EXE
After PCCOM.SYS is executed (For example, set up 3F8 port), just run VT to enter virtual terminal evaluation mode. The screen you will see is shown below.
You may key in character from keyboard to communicate with host computer or select function to setup communication parameters. All available function keys are shown in the following.

F1   HELP
When press F1 key, system will display functions that you can select.

F2   S/CTRL  
Press F2 key will send XOFF code to host computer to notice that virtual terminal is too busy. When you want set XON to host computer again, please press Q/CTRL.

F3   SETUP
Setup the communication protocol such as baud rate, data bits, stop bits ... etc.

F4   C/CTRL
Press F4 key will send C/CTRL code to remote computer to kill the executing process.

F5   LISTCFG
List the communication parameters on the screen.

F6   SAVECFG
Save the setup communication parameters to disk file named VT.CFG.

F7   Download (receive data from host)
Receive data from the remote site then save these data to a user specified file.

F8   Upload (transmit data to remote site)
Transfer a user specified file that located at PC (which is now run VT) to remote site.

F9   EXIT
Exit virtual terminal evaluator.

F10  SHELL
Fork MS/DOS shell command interpreter, the terminal evaluator is still resident on the main memory. When you enter shell command,  you may run any MS/DOS commands and programs, because you stay at MS/DOS mode. To enter VT again, please type EXIT.

A.3.1 Download Data from Host
When you select F7, system will ask a file name which is used to save data that sent from remote computer.

Suppose your virtual terminal is connected to XENIX operating system and you want download a file aa from host to PC, and save it in PC.DOC file, the procedure is

  cat aa                   (don't enter <CR>)
  F7                        (select F7)
  PC.DOC               (enter file name)
  <CR>

A.3.2 Upload Data to Host
When you select F8, system will ask a file name and send the file contents to host computer. Under XENIX operating system, suppose you want send a file PC.DOC from PC to host computer and save it in aa file, the upload procedure is

  cat > aa
  F8
  PC.DOC
  <CR>

A.3.3 Setup
When you select F3, you may modify the communication parameters. After communication parameters are setup, you may use F6 to save the configuration   and F5 to list the configuration. When VT is loaded, it will check VT.CFG to load the last save configuration automatically. The communication parameters are list in the following.

1. IRQ number
Select which interrupt.

2. port number
Select which I/O port.

3. baud rate
Select communication speed.

4. data bits
Select data bits

5. stop bits
Select stop bits.

6. parity
Press SPACE bar to select parity.

7. ECHO
Press SPACE bar to select local ECHO ON/OFF. When your host computer has ability to send back the received character, you must select local ECHO OFF to let host computer prompt your typing character.

8. new line
Press SPACE bar to select new line ON/OFF. VT will add <CR> code when it receive <LF> at new line ON mode.

9. delay time
Select delay time interval between two transmitting characters when upload is processing.
Back
A.4 Examples
The following control string will draw a figure which is shown in the next page. Don't forget to press any key to enter text mode.

ESC>P
L00000000000010000000
L00100000000010000100
L00100001000000000100
L00000001000000000000
P0005000030
P0005200032
P0005400034
P0005600036
P0005800038
P0006000040
P0006200042
P0006400044
P0006600046
P0006800048
C001000010000050
C001000010000040
C001000010000030
C001000010000020
C001000010000010
C001000010000005
C001000010000015
C001000010000025
C001000010000035
C001000010000045
C001000010000055
M0010000100
D0030000200
D0009000090
Q

Where <ESC> is an ASCII code of <ESC>. We have not store <ESC>P to the VT.DOC file, so that you must send it from keyboard to enter graphics mode.