home *** CD-ROM | disk | FTP | other *** search
- This is the documentation file for the VT100 terminal emulator by Dave
- Wecker (V2.6 DBW 870227). Comments/suggestions/bugs/problems/praise
- should be sent to:
-
- Dave Wecker at ENET: COOKIE::WECKER
- ARPA: wecker%cookie.dec.com@decwrl.dec.com
- USENET: {decvax|decwrl}!cookie.dec.com!wecker
- SNAIL: Dave Wecker
- 115 Palm Springs Drive
- Colorado Springs, CO 80908
-
- MANY pieces of code/suggestions have been sent in..
-
- thanks to all!
-
- Program startup:
- ----------------
- 1> vt100 [initfile]
-
- - At startup, the program will search for an initialization
- file to execute. It will first look for the specified
- "initfile", then VT100.INIT (in the current directory)
- and finally S:VT100.INIT. The format for the init file
- is described later in this document.
-
- - The init file controls the setting of initial defaults
- and screen and macro definitions.
-
- - If none of the files (listed above) are found, the
- built-in defaults (defined in VT100.C as variables,
- beginning with "p_") are used.
-
- - All commands are either menu or script based. Scripts
- are described below.
-
- Menus (Commands in parenthesis are keyboard bindings: Right-Amiga-chr):
- -----------------------------------------------------------------------
- File - file transfers
- Ascii Capture - Begin/end a script of the current session
- Ascii Send - Type a file to the host
- Xmodem Receive (A-V) - Receive a file using XMODEM protocol
- Xmodem Send (A-^) - Send a file using XMODEM protocol
- Kermit Get (A-G) - Receive files from a host KERMIT SERVER
- Kermit Receive (A-R) - Receive files from a host KERMIT
- Kermit Send (A-S) - Send files to a host KERMIT [SERVER]
- Kermit Bye (A-B) - Terminate a host KERMIT SERVER
- Comm Setup - Setup communications
- Baud Rate - Set the terminal baud rate
- 300,
- 1200, (A-L)
- 2400, (A-H)
- 4800,
- 9600
- Parity - Type of parity
- NONE, (A-X)
- MARK,
- SPACE,
- EVEN, (A-E)
- ODD (A-O)
- Xfer Mode
- Image (A-I) - Send files verbatim (for UNIX hosts or
- binary files)
- Text (A-T) - Send CR LF as line terminator and strip
- CR on received files (VMS text).
- Convert - Should KERMIT convert fnames to lower case
- Script - Script commands
- Execute file - Start up an asynchronous script file
- Abort Execution - Terminate a script file
- Utility - Utility commands
- Send Break (A-.) - send a break to the host
- Hang Up - close line (not implemented yet)
- Change Dir (A-D) - change the local directory (for transfers)
- Clear Scrn - clear the screen (initial state)
- Echo - turn on/off half duplex mode
- Wrap (A-W) - turn on/off long line wrapping mode
- Num Key (A-K) - turn on/off numeric keypad mode
- App Cur (A-C) - turn on/off application cursor mode
- BS<->DEL (A-Z) - swap backspace and delete keys
-
- Keypad mapping (in application keypad mode):
- --------------------------------------------
-
- AMIGA VT100 comments
- ------- ------- ---------------------------
- 0-9 == 0-9
- . == .
- ENTER == ENTER (basically, flip the bottom
- - == , 2 keys up to get a VT100)
- HELP == - (only free key around)
- f1-f4 == PF1-PF4 (or any rebinding you do)
- arrows == arrows
-
- Note: Right AMIGA key in conjunction with a period (".")
- will send a break to the host.
-
- CTRL in conjunction with an at-sign ("@") a two ("2") or a
- space (" ") will send a NULL to the host.
-
- CTRL in conjunction with a six ("6") will send a CTRL-^
- CTRL in conjunction with a dash ("-") or question mark ("?")
- will send a CTRL-_ to the host.
-
- Multi file Xfers:
- -----------------
- The VT100 emulator supports multiple file transfers. This is
- specified by using a comma (",") between file names when using XMODEM
- or KERMIT. (NOTE: host XMODEM's normally CANNOT support multiple file
- transfers).
-
- When specifying a file name to recieve by default the directory path
- is stripped off of the filename when sent to the host but is kept for the
- local file spec. eg:
-
- receive file: ram:file.txt,df1:newfile.bin,$
-
- will ask the server for file.txt and put it in ram:, and get
- newfile.bin and put it on df1: (see explanation of "$" below). If you
- do a single file transfer you will get another prompt for the remote
- name e.g.:
-
- receive file: ram:file.txt
- remote file name [file.txt]: userdisk1:wantfile.txt
-
- The same rules apply to sending multiple files therefore if you are
- doing multi file transfers make sure the host server is connected to
- the desired directory.
-
- In addition KERMIT supports wildcards:
- * = any number of characters
- ? = any single character
- Examples:
- send: *.c,*.h,*.doc
- get: *.c,*.h,$
-
- KERMIT receive is now smart enough to use the host filename so no
- filename needs to be specified on the AMIGA's side (see the CONVERT option).
-
- Initialization and Script file operation:
- -----------------------------------------
- An initialization file (as described in the "Program Startup" section)
- may contain any of the commands shown below that have the word INIT in
- their description below. Commands that are available from scripts have
- the word SCRIPT in the descriptions below. All commands may be abbreviated
- to 3 letters and are case insensitive.
-
- The script file can be invoked by selecting 'execute file' from the
- script menu. At any time you can abort the script file by selecting
- 'Abort Execution'. You may also invoke a script from a function key if
- the first character of the function key definition is the KEYSCRIPT
- character (e.g., define F5 as "~df1:foo.script").
-
- During the time script file is running the terminal emulation is still
- active and you may type simulataneous to the script file. This may be
- desired if your script file is WAITing for a string or is DELAYing for
- a period of time etc.
-
- Initialization and Script file Commands:
- ----------------------------------------
- # Commented line (INIT,SCRIPT)
- Format:
- # This line is a comment
- ------------------------------------------------------------
- APPCUR Set the application cursor mode (INIT,SCRIPT)
- Format:
- APPCUR ON/OFF or YES/NO
- ------------------------------------------------------------
- ASCII_SEND Send an ascii file to the host. (SCRIPT)
- Format:
- (same format as CAPTURE)
- ------------------------------------------------------------
- BACKGROUND Define a background color (INIT)
- Format:
- BACKGROUND hex three digit hex number
- Example:
- BACKGROUND F00 bright red background
- ------------------------------------------------------------
- BAUD Set baud rate (INIT,SCRIPT)
- Format:
- BAUD rate Sets the baud rate for send/receive
- Example:
- BAUD 2400 Sets the baud rate at 2400 baud
- ------------------------------------------------------------
- BEEP Beep at the console (SCRIPT)
- Format:
- BEEP
- ------------------------------------------------------------
- BOLD Define a color for bold (INIT)
- Format:
- (same as BACKGROUND)
- ------------------------------------------------------------
- BREAK Set the break time (for an SB command) (INIT,SCRIPT)
- Format:
- BREAK value Value is in micro-seconds
- Example:
- BREAK 750000
- ------------------------------------------------------------
- BUFFER Set transmission buffer size (INIT)
- Format:
- BUFFER n Number of bytes to buffer
- Example:
- BUFFER 512
- ------------------------------------------------------------
- CAPTURE To start/stop ascii file capture. (SCRIPT)
- Format:
- CAPTURE file Start ascii capturing
- CAPTURE End ascii capturing
- ------------------------------------------------------------
- CD To change the local directory (SCRIPT)
- Format:
- CD newdir set a new directory for file transfers
- Example:
- CD DF1:foo/bar set the directory as specified
- ------------------------------------------------------------
- CONVERT Tell KERMIT whether or not to convert filenames (INIT,SCRIPT)
- Format:
- CONVERT ON/OFF or YES/NO
- Example:
- CONVERT ON Filenames will be down cased
- ------------------------------------------------------------
- CURSOR Define a color for the cursor (INIT)
- Format:
- (same as BACKGROUND)
- ------------------------------------------------------------
- DELAY Suspends script file for a specified time (SCRIPT)
- Format:
- DELAY n Suspends execution for n seconds
- Example:
- DELAY 2 Suspends for 2 seconds
- ------------------------------------------------------------
- DEPTH Define the depth of the window/screen (INIT)
- Format:
- DEPTH n Number of planes in window/screen
- Example:
- DEPTH 1 Minimum depth
- DEPTH 2 Same as Workbench
- ------------------------------------------------------------
- ECHO Turn on/off local echo (INIT,SCRIPT)
- Format:
- ECHO ON/OFF or YES/NO
- Example:
- ECHO ON Half duplex mode
- ------------------------------------------------------------
- EXIT Ends execution of the current script file. (INIT,SCRIPT)
- Format:
- EXIT Exit the current script/init file
- EXIT VT100 Exit vt100 program (from SCRIPT only)
- EXIT newscript Exit this file and start up newscript
- Example:
- EXIT DF1:FOO.BAR Exit the current file and start FOO.BAR
- ------------------------------------------------------------
- F Define a function key (INIT,SCRIPT)
- Format:
- F n string Define Function key n to be string
- Example: (see SEND for string format)
- F 1 "dir^M" Define F1 is the string dir<cr>
- F 11 "help" Define Shifted F1 as the string help
- F 20 ^C Define Shifted F10 as a control-C
- ------------------------------------------------------------
- FOREGROUND Define a color for the foreground (INIT)
- Format:
- (same as BACKGROUND)
- ------------------------------------------------------------
- GOTO Jumps to a different part of the script file. (SCRIPT)
- Format:
- GOTO label Jumps to a line beginning with label:
- Jumps may be forward or backward.
- Example:
- FOO: Sets up a label
- ...
- GOTO FOO Jumps to FOO
- ------------------------------------------------------------
- INTERLACE Turn on/off interlace (INIT)
- Format:
- INTERLACE ON/OFF or YES/NO
- Example:
- INTERLACE ON Use interlacing
- ------------------------------------------------------------
- KB Send a BYE packet to a host KERMIT server. (SCRIPT)
- Format:
- KB Shut down server.
- ------------------------------------------------------------
- KEYSCRIPT Define a new keyscript character (INIT,SCRIPT)
- Format:
- KEYSCRIPT hex New character in hex
- Example:
- KEYSCRIPT 7E Use "~" as the new character
- ------------------------------------------------------------
- KG Gets files from host. (SCRIPT)
- Format:
- (same format as KS) Get from server
- ------------------------------------------------------------
- KR Receives a file from kermit host. (SCRIPT)
- Format:
- (same format as KS) Not from a server
- ------------------------------------------------------------
- KS Sends files via kermit to the host. (SCRIPT)
- Format:
- KS file Send one file
- KS file1,file2,... Send multiple files
- KS file1,file2,...,$ Send multiple files and shut down server
- Example:
- KS foo.bar sends foo.bar (note no quoting is used)
- KS foo1,foo2,foo3 sends three files
- KS foo1,foo2,foo3,$ sends three files and shuts down server
- ------------------------------------------------------------
- LINES Define number of lines in the window (INIT)
- Format:
- LINES n
- Example:
- LINES 24 Maximum for non-interlace
- LINES 48 Maximum for interlaced
- ------------------------------------------------------------
- MODE Set a transfer mode for KERMIT to use (INIT,SCRIPT)
- Format:
- MODE type type of transfers to perform
- Example:
- MODE IMAGE image mode transfers
- MODE CRLF <CR><LF> text transfers (VMS Kermit).
- ------------------------------------------------------------
- NUMKEY Numeric keypad mode (INIT,SCRIPT)
- Format:
- NUMKEY ON/OFF or YES/NO
- Example:
- NUMKEY ON Keypad is pure numbers
- ------------------------------------------------------------
- ON Peforms a command every time string is received (SCRIPT)
- Format:
- ON "string" cmd Execute cmd when string is received.
- Only one ON string may be installed at a
- time.
-
- If cmd is a GOTO and we were previously
- WAITing for a string the WAIT is aborted and
- execution resumes at the new label.
-
- If cmd is not SEND and we were previously
- DELAYing, then the DELAY is aborted and the
- cmd is executed, followed by the next command
- after the DELAY.
-
- If cmd is a SEND and we were previously
- DELAYing, then the DELAY is continued.
- Example:
- ON "LOSS CARRIER" GOTO RESTART
- If modem drops carrier, try to redial
- ON "--more--" SEND " "
- Send a space every time --more-- is received
- ------------------------------------------------------------
- PARITY Sets the parity (INIT,SCRIPT)
- Format:
- PARITY type Set the parity type
- Example:
- PARITY NONE no parity
- PARITY MARK mark parity
- PARITY SPACE space parity
- PARITY ODD odd parity
- PARITY EVEN even parity
- ------------------------------------------------------------
- SB Sends a break character to the host (SCRIPT)
- Format: Note that any pending character to send
- SB is aborted by this call
- ------------------------------------------------------------
- SCREEN Define the screen type (INIT)
- Format:
- SCREEN type type of screen to use
- Example:
- SCREEN WORKBENCH use the workbench screen
- SCREEN CUSTOM use a custom screen
- ------------------------------------------------------------
- SEND Sends a string or character to the host. (SCRIPT)
- Format:
- SEND "string" Sends a string to the host. Beginning and
- ending double quotes (") are required. A
- carat (^) may be used to send control chars.
- Two carats transmits a carat character.
- SEND chr Sends a single character.
- SEND ^chr Sends a single control character. The chr
- is NOT case sensitve
- Example:
- SEND "mail" Send the string mail
- SEND "dir^M" Send the string dir followed by a <CR>
- SEND a Send the letter a
- SEND ^C Send a control C
- SEND "abc^^def" Send the string abc^def
- SEND ^^ Send a control-uparrow
- SEND " Send the '"' character
- ------------------------------------------------------------
- SWAP Swap the meanings of backspace and delete keys (INIT,SCRIPT)
- Format:
- SWAP ON/OFF or YES/NO
- Example:
- SWAP NO Use standard definitions
- ------------------------------------------------------------
- VOLUME Set the BELL volume (INIT)
- Format:
- VOLUME n
- Example:
- VOLUME 0 Use a visual bell
- VOLUME 64 Use a loud audible bell
- ------------------------------------------------------------
- WAIT Suspends until a certain string is received. (SCRIPT)
- Format:
- WAIT "string" Same rules for string as SEND
- WAIT Enter an endless wait. Usually used after
- some "ON" commands have been set up. Can
- still be aborted via the script menu.
- Example:
- WAIT "User:" Waits for the string User:
- ------------------------------------------------------------
- WBCOLORS Force usage of workbench colors (INIT)
- Format:
- WBCOLORS ON/OFF or YES/NO
- Example:
- WBCOLORS YES Workbebch colors will be used for all
- ------------------------------------------------------------
- WRAP Set long line wrapping (INIT,SCRIPT)
- Format:
- WRAP ON/OFF or YES/NO
- Example:
- WRAP ON Long lines will wrap
- ------------------------------------------------------------
- XR Receives a file via XMODEM. (SCRIPT)
- Format:
- (same format as KS)
- ------------------------------------------------------------
- XS Sends a file via XMODEM. (SCRIPT)
- Format:
- (same format as KS)
- ------------------------------------------------------------
-
-
- ----------------------------
- Initialization file example:
- ----------------------------
-
- #####################################################################
- #
- # VT100 sample initialization file
- # v2.6 870222 DBW - Dave Wecker standard defaults
- #
- # Hash mark at the beginning of a line denotes a comment.
- # White space (space(s) or tab(s)) delimit fields.
- # Case ignored except for function key bindings.
- #
- # All items in this file overide variables of the same name in VT100.C
- # (all variables in vt100.c have a "p_" prepended to them)
- #
- #####################################################################
- #
- APPCUR ON # Application keypad mode is being used
- BACKGROUND 000 # Colors are in hex RGB from 000 to FFF
- BAUD 2400 # Anything after required fields is ignored
- BOLD a00 # Color for bold highlighting (in custom)
- BREAK 750000 # Break time in micro-seconds
- BUFFER 512 # 512 <= Input buffer size <= 2048
- CONVERT ON # KERMIT should downcase host names
- CURSOR 00a # Color for cursor (in custom screen)
- DEPTH 1 # number of bit planes to use (1 or 2)
- ECHO OFF # Full duplex mode in use
- FOREGROUND 950 # Colors are only used on the custom screen
- INTERLACE ON # ON for CUSTOM or interlaced workbench
- KEYSCRIPT 7E # Hex value for script introducer
- LINES 48 # normal <= 24 interlaced <= 48
- MODE CRLF # IMAGE or CRLF (for KERMIT transfers)
- NUMKEY ON # The keypad should be numeric
- PARITY NONE # NONE (= 8 bit), MARK, SPACE, ODD or EVEN
- SCREEN CUSTOM # may be CUSTOM or WORKBENCH
- SWAP OFF # Don't Swap the Back-space and Delete keys
- VOLUME 64 # Beep Volume (0 = Visual Beep)
- WBCOLORS YES # ignore custom colors and use defaults
- WRAP OFF # Auto wrap ON or OFF
- #
- # Function bindings (strings to type when any of F1 - F10 are pressed)
- # f <num> = function key
- # f <num>+10 = shifted function key
- #
- # The string specified must be the same format as the SEND command:
- # ^ = control next character
- # ^^ = up arrow
- #
- # Sample control characters:
- # ^[ = escape ^M = carriage return
- # ^J = line feed ^L = form feed
- #
- # If the first character of the string is a script introducer
- # (KEYSCRIPT) then the string is interpreted as a script filename
- # to be executed when the key is pressed.
- #
- # Examples of bindings:
- #
- f 1 "^[OP" # f1-f4 = PF1 - PF4 on a VT100
- f 2 "^[OQ"
- f 3 "^[OR"
- f 4 "^[OS"
- #
- # f5,6,7 = scripts to execute (assuming that KEYSCRIPT = '~' = 0x7E)
- #
- f 5 "~df1:vt100_source/dialwork.script"
- f 6 "~df1:vt100_source/sendvt100.script"
- f 7 "~df1:vt100_source/getpics.script"
- #
- f 8 "MAIL^M" # Reads my mail (note embedded <CR>)
- f 9 "NOTE^M" # Reads conferences
- f 11 "$2400!" # dials the phone to work
- f 12 "$bbs1!" # dials the phone to billboard 1
- f 13 "$bbs2!" # dials the phone to billboard 2
- f 14 "$bbs3!" # dials the phone to billboard 3
- #
- # all done with init, now execute script as startup sequence
- #
- exit df1:vt100_source/dialwork.script
-
- --------------------
- Script file example:
- --------------------
-
- ###################################################################
- # Script to dial work (dialwork.script)
- # v2.6 870222 DBW
- ###################################################################
- #
- # Make sure that we have all the parameters we want
- #
- DELAY 2
- BAUD 2400
- PARITY NONE
- MODE CRLF
- BREAK 750000
- SB
- #
- # First get the modem's attention:
- #
- Start:
- DELAY 1
- ON "Ready" GOTO Dial
- SEND ^B
- DELAY 2
- GOTO Start
- #
- # Now dial the 2400 baud line to work:
- #
- Dial:
- ON "Attached" GOTO Login
- SEND "$2400!"
- DELAY 30
- GOTO Start
- #
- # We got attached, so keep hitting return until the Gandalf terminal
- # handler wakes up:
- #
- Login:
- ON "enter" GOTO Gandalf
- DELAY 1
- SEND ^M
- GOTO Login
- #
- # Now connect from the Gandalf to the terminal server (ts2):
- # (when it asks for a password I need to type the password
- # manually here)
- #
- Gandalf:
- DELAY 2
- SEND "ts2^M"
- WAIT "class start"
- #
- # Keep sending <CR>'s until the LAT prompts for a username:
- #
- WaitLat:
- DELAY 2
- ON "username>" GOTO Lat
- SEND ^M
- GOTO WaitLat
- #
- # Tell the LAT that it's me, and connect to the "cookie cluster"
- # (my host systems). Tell the cluster my user name.
- # (when it asks for a password I need to type the password
- # manually here)
- #
- Lat:
- SEND "wecker^M"
- DELAY 1
- SEND "connect cookie^M"
- WAIT "Username:"
- SEND "WECKER^M"
- WAIT "at home"
- SEND "^M^Mn^M"
- #
- # Got through all the LOGIN garbage, so let's do some work.
- #
- WAIT "$ "
- #
- # All done so stop:
- #
- EXIT
-
-