home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Club Amiga de Montreal - CAM
/
CAM_CD_1.iso
/
files
/
021.lha
/
Vt100_v2.4
/
vt100.doc
< prev
next >
Wrap
Text File
|
1986-11-10
|
18KB
|
598 lines
This is the documentation file for the VT100 terminal emulator by Dave
Wecker (V2.4 DBW 861214). 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
Multi-file transfer, the new version of KERMIT and script support were
contributed by Steve Drew (Aug 20 1986). If you wish to thank Steve
directly he can be contacted through:
Steve Drew at ENET: CGFSV1::DREW
ARPA: drew%cfgsv1.dec.com@decwrl.dec.com
USENET: decvax!decwrl!cgfsv1.dec.com!drew
Many other 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.H 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).
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)
Keypad mapping (in application 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.
Initialization file example:
----------------------------
Here is a (hopefully) self-explanatory VT100.INIT file with all
options used:
#####################################################################
#
# VT100 sample initialization file
# v2.4 861214 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.H
# (all variables in vt100.h have a "p_" prepended to them)
#
#####################################################################
#
BAUD 2400 # Anything after required fields is ignored
SCREEN CUSTOM # may be CUSTOM or WORKBENCH
INTERLACE ON # ON for CUSTOM or interlaced workbench
DEPTH 1 # number of bit planes to use (1 or 2)
WBCOLORS YES # ignore custom colors and use defaults
FOREGROUND 950 # Colors are only used on the custom screen
BACKGROUND 000 # Colors are in hex RGB from 000 to FFF
BOLD a00 # Color for bold highlighting (in custom)
CURSOR 00a # Color for cursor (in custom screen)
LINES 48 # normal <= 24 interlaced <= 48
MODE CRLF # IMAGE or CRLF (for KERMIT transfers)
BUFFER 512 # 512 <= Input buffer size <= 2048
PARITY NONE # NONE (= 8 bit), MARK, SPACE, ODD or EVEN
BREAK 750000 # Length for break key in microseconds
VOLUME 64 # Beep Volume (0 = Visual Beep)
WRAP OFF # Auto wrap ON or OFF
KEYSCRIPT 7E # Hex value for script introducer
#
# Function bindings (strings to type when any of F1 - F10 are pressed)
# f<num> = function key
# F<num> = shifted function key
#
# The string specified must be delimited and uses one special char:
# ^ = 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:
#
f1 "^[OP" # f1-f4 = PF1 - PF4 on a VT100
f2 "^[OQ"
f3 "^[OR"
f4 "^[OS"
#
# f5,6,7 = scripts to execute (assuming that KEYSCRIPT = '~' = 0x7E)
#
f5 "~df1:vt100_source/dialwork.script"
f6 "~df1:vt100_source/sendvt100.script"
f7 "~df1:vt100_source/getpics.script"
#
f8 "MAIL^M" # Reads my mail (note embedded <CR>)
f9 "NOTE^M" # Reads conferences
F1 "$2400!" # dials the phone to work
F2 "$bbs1!" # dials the phone to billboard 1
F3 "$bbs2!" # dials the phone to billboard 2
F4 "$bbs3!" # dials the phone to billboard 3
#
# all done with init, now execute script as startup sequence
#
exit df1:vt100_source/dialwork.script
Multi file Xfers:
-----------------
The VT100 emulator now 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 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 now 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.
Script file operation:
----------------------
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'.
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.
Script file Commands (case insensitive):
------------------------------------------------------------
# Commented line
Format:
# comment may not be on same line as a command.
Example:
# this is a comment
------------------------------------------------------------
ASCII_SEND Send an ascii file to the host.
Format:
(same format as CAPTURE)
------------------------------------------------------------
BAUD Set baud rate
Format:
BAUD rate Sets the baud rate for send/receive
Example:
BAUD 2400 Sets the baud rate at 2400 baud
------------------------------------------------------------
BT Set the break time (for an SB command)
Format:
BT value Value is in micro-seconds
Example:
BT 750000
------------------------------------------------------------
CAPTURE To start/stop ascii file capture.
Format:
CAPTURE file Start ascii capturing
CAPTURE End ascii capturing
Example:
CAPTURE foo.bar Starts capture of file foo.bar
CAPTURE Ends ascii capture of file foo.bar
------------------------------------------------------------
CD To change the local directory
Format:
CD newdir set a new directory for file transfers
Example:
CD DF1:foo/bar set the directory as specified
------------------------------------------------------------
DELAY Suspends script file for a specified time
Format:
DELAY n Suspends execution for n seconds
Example:
DELAY 2 Suspends for 2 seconds
------------------------------------------------------------
EXIT Ends execution of the current script file.
Format:
EXIT Exit the current script
EXIT VT100 Exit vt100 program
EXIT newscript Exit this script and start up newscript
Example:
EXIT DF1:FOO.BAR Exit the current script and start FOO.BAR
------------------------------------------------------------
GOTO Jumps to a different part of the script file.
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
------------------------------------------------------------
KB Send a BYE packet to a host KERMIT server (shut down server).
Format:
KB
------------------------------------------------------------
KG Gets files from host. (which is running as a server).
Format:
(same format as KS)
------------------------------------------------------------
KR Receives a file from kermit host (not running as server)
Format:
(same format as KS)
------------------------------------------------------------
KS Sends files via kermit to the host.
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
------------------------------------------------------------
ON Peforms a command every time a string is received
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
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
------------------------------------------------------------
SEND Sends a string or character to the host.
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
------------------------------------------------------------
SB Sends a break character to the host
Format:
SB Note that any pending character to send
Example: is aborted by this call
SB
------------------------------------------------------------
TM Set a transfer mode for KERMIT to use
Format:
TM type type of transfers to perform
Example:
TM IMAGE image mode transfers
TM CRLF <CR><LF> text transfers (VMS Kermit).
------------------------------------------------------------
WAIT Suspends the script file until a certain string is received.
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 aborted via the script menu.
Example:
WAIT "User:" Waits for the string User:
WAIT Waits forever
------------------------------------------------------------
XR Receives a file via XMODEM.
Format:
(same format as KS)
------------------------------------------------------------
XS Sends a file via XMODEM.
Format:
(same format as KS)
------------------------------------------------------------
Script file examples:
--------------------
###################################################################
# Script to dial work (dialwork.script)
# v2.4 861214 DBW
###################################################################
#
# Make sure that we have all the parameters we want
#
DELAY 2
BAUD 2400
PARITY NONE
TM CRLF
BT 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 (ts1):
# (when it asks for a password I need to type the password
# manually here)
#
Gandalf:
DELAY 2
SEND "ts1^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^M^M"
#
# Got through all the LOGIN garbage, so let's do some work.
#
WAIT "$ "
#
# Now go back to the LAT and connect to my workstation
#
SEND "^]connect child^M"
WAIT "login:"
SEND "wecker^M"
WAIT "at home"
SEND "^M^M^M"
#
# Leave us on VMS
#
SEND ^^
DELAY 2
#
# Go run the next script
#
EXIT df1:vt100_source/sendvt100.script
#####################################################################
# Script to upload the terminal emulator sources (sendvt100.script)
# v2.4 861214 DBW
#####################################################################
#
# Make sure that we have all the parameters we want
#
DELAY 2
PARITY NONE
TM IMAGE
#
# Get into the right directory and upload to my U**X workstation
#
CD df1:vt100_source
SEND ^^
SEND "cd ~/amiga/vt100^M"
SEND "rm -f *^M"
WAIT "% "
DELAY 2
#
# Send the readme file for the terminal emulator via XMODEM:
#
SEND "xmodem -r readme^M"
DELAY 3
XS readme
WAIT "% "
#
# Send the other terminal emulator files via KERMIT:
#
DELAY 1
SEND "kermit -x^M"
DELAY 3
KS vt100.doc,makefile,vt100.h,*.c
DELAY 2
KB
WAIT "% "
#
# We popped out of server mode, so send the compiled code
#
DELAY 1
SEND "kermit -i -x^M"
DELAY 3
KS vt100
DELAY 2
KB
WAIT "% "
#
# Now build the target shar files
#
SEND "shar -a readme vt100.doc makefile vt100.h vt100.c init.c "
SEND "> vt100_24a.shar^M"
SEND "shar -a script.c remote.c window.c expand.c kermit.c xmodem.c "
SEND "> vt100_24b.shar^M"
#
# Time to pull copies over to VMS
#
SEND ^^
SEND "swi [wecker.amiga]^M"
SEND "cop child::"
SEND "
SEND "/staff/wecker/amiga/vt100/vt100_24a.shar"
SEND "
SEND " []vt100_24a.shar^M"
WAIT "$ "
SEND "cop child::"
SEND "
SEND "/staff/wecker/amiga/vt100/vt100_24b.shar"
SEND "
SEND " []vt100_24b.shar^M"
WAIT "$ "
SEND "cop child::"
SEND "
SEND "/staff/wecker/amiga/vt100/vt100"
SEND "
SEND " []vt100_24.bin^M"
WAIT "$ "
#
# Make them available to the world
#
SEND "pub vt100_24*.*^M"
WAIT "$ "
#
# All done so go to the next script
#
EXIT df1:vt100_source/getpics.script
###################################################################
# Script to download images (getpics.script)
# v2.4 861214 DBW
###################################################################
#
# Make sure that we have all the parameters we want
#
DELAY 2
PARITY NONE
TM CRLF
#
# Get into the right directory and download
#
CD RAY:
SEND "swi [wecker.render]^M"
SEND "kermit server^M"
DELAY 3
KG *.img
DELAY 2
KB
WAIT "$ "
#
# Now get out of the emulator
#
EXIT VT100