The program BAUD provides automatic baud rate selection on DZ-11 lines.
It runs in a detached process and maintains a one character read on 
all terminals to be autobauded.  All logins on an autobaud line must be
started by the user typing a carriage return.  The BAUD program determines
the incoming terminal speed by analyzing the data received and resets the
DZ-11 speed to that of the incoming signal.  The program also listens to
a mailbox to receive configuration commands.  These commands can be used to
enable/disable a particular line for autobauding or to alter the default
baud rates which are allowed.

A fairly detailed discussion of the theory and operation of BAUD is contained
in the comments at the beginning of the program.  Below are a few more random
comments on various aspects of the program.

Design goals:

The primary design goal was to allow single carriage return autobauding
of speeds between 110 and 2400 baud.  The inclusion of multi-carriage
return "hunting" for a speed over a wider range was a secondary consideration.
Another goal was the inclusion of a mechanism for supplying dynamic 
configuration information, hence the use of the configuration mailbox.  It
was hoped that this feature would eliminate the need for modifying the program
for use by other installations.  Finally, a major goal was to provide a
controlled mechanism for performing a hangup (drop modem signals) function.
This is not provide by VMS and is a necessity for some communications 
equipment, such as a port selector.

Building the program:

The instructions for building BAUD are located in the comments at
the beginning of the program.  The assembly requires the use of SMAC,
a macro package which implements various structured programming features.
Error messages are handled using the $PUTMSG system service.  The messages
file must be compiled using the VMS MESSAGE compiler and linked with the
assembler output.

Running the program:

The normal way to run BAUD is in a detached process as shown in the comments.
A batch or detached job can be spawned from SYSTARTUP.COM to run BAUD and
do the COPY.  This cannot be done directly in SYSTARTUP since the BAUD process
does not begin execution until SYSTARTUP finishes. A $WAIT command of 10-20 
seconds will allow the RUN to complete and the mailbox to be created
before commands are sent. If the log messages (see below) are enabled, 
the RUN command should also specify the qualifier /OUTPUT=filespec which
describes where the messages should be written.

Modifying the program:

The provision for configuration commands should minimize the need for 
customizing the program, at least in the modes for which the program
was designed.  Most of the program parameters are in the "Symbol
definitions" section.  The current maximum number of terminals is 48.
This controls the size of the terminal status table and can be increased
by changing the symbol MAX_TERMS.  If baud rates higher than 2400 are
needed, the default read baud rate (DEFAULT_SPEED) should be raised.
If the default baud rates are to be changed, the symbols DEF_HIGHEST_BAUD
and DEF_LOWEST_BAUD should be changed, along with modifying the flags
in OUR_RATES (in section "Read/Write Data").  The scan interval, and reset
intervals can be modified and are controlled by the symbols SCAN_SECS,
RELEASE_SECS, and ADJ_SPEED_SECS.  The HANGUP_SECS parameter should be
about twice the system parameter TTYSCANDELTA.  If it works with a shorter
interval, so much the better.  The parameter LOG_ENABLE controls the 
conditional assembly of code to issue logging/debugging messages.  For 
normal operation, it should be zero, but if a problem develops, the messages
are very useful.

Known limitations or problems:

The current listening rate used is 1200 baud.  This requires a second
carriage return be entered at 150 or 110 baud.  An alternative is to
use 600 baud as the default DZ-11 speed, which gets the whole 110-2400 range
with one carriage return.  The problem at 600 baud is that the 2400 baud
pattern and the 1200 baud pattern only differ by one bit.  If a terminal
is off speed, or if a partial return is generated (such as by turning
a modem off and on) the terminal will false to 1200. You must then wait
for the line to timeout (about 20 seconds) before being able to login.

There is a window of HANGUP_SECS during which the terminal will not respond.
This seems unavoidable based on the way the QIO HANGUP function works.  

Following a logout, a login can take place immediately, provided it was at
the same speed as in use at the logout.  If the speed changes, there is a
window of from 0 to SCAN_SECS before BAUD gets control of the line during
which a login attempt will return garbage (DZ-11 is at wrong speed).  This
is not usually a problem.  Worst-case window can be shortened by reducing
SCAN_SECS at the expense of more system overhead (scanning the lines more
often).

This is only the first version of BAUD and so there may be undiscovered bugs
or additional capabilities that would be nice.  Please refer any comments
or questions to:

	Gary L. Grebus
	Battelle Columbus Laboratories
	505 King Avenue
	Columbus, OH  43201
	(614)424-4664

