1 BOSS
BOSS is an interactive job controller.  It lets you run several interactive
jobs simultaneously.  Before running BOSS put

    $ SETUP BOSS

into your login.com file.  In order to run BOSS type

    $ BOSS

BOSS can operate in one of two modes:
* regular mode.  This works with any terminal.  See subtopic Description for
  an overview.
* multi-window mode; this ONLY works with a Macintosh running the UW terminal
  emulator.  See subtopic Windows for an overview and further details.
2 Description
BOSS lets you create up to 8 processes on a VAX/VMS system.  Each process is
identified by a single letter (A thru Z).  This letter is used in the
process name and in the DCL prompt.  At most one of these processes is
`current'.  What you type is sent to that process, and output from that
process is sent to your terminal.  A process which is not current can run
but normally cannot do output.  (What happens to the output is governed by
the output flag for a particular process.  See topic Output_flags.)  You
usually switch between processes by typing control-\ followed by the
identifying letter.  It is also possible to have have of your processes
initiate the switch.  (See topic Communicating.)

You can run any program under BOSS.  For example, you might
    run Emacs or EVE                   in process E
    SET HOST to another machine        in process H
    run NETTY to the B machine         in process B
    do a FORTRAN compilation           in process F
    execute DCL commands               in process D
    talk to your colleague using PHONE in process P
and so on.

Of course, you would normally not need to run so many processes.  (Indeed
your subprocess quota may only let you run 5 processes.)  When you are
through with a process, you should log out of it (with `logout') and switch
to some other process.

BOSS makes no attempt to keep track of what is on your screen.  Usually when
switching to a process which manages the screen in an advanced manner, you
should issue a command to the program to get it to re-draw the screen.
(This is control-w for EVE, PHONE, SPELL; control-l for Emacs.)

BOSS uses needs to know the escape sequences for clearing your screen, etc.
By default, it uses the VT100 sequences which work for a wide range of
terminals.  See topic Terminal_types.
2 Commands    
Usually, all commands to BOSS begin with the command character which by
default is C-\ (control-\).  The command character can be changed by using
the /COMMAND_CHARACTER qualifier to BOSS.  The command character is not
required is when there is no current process (i.e., initially and
immediately after logging out of a process).  In that case the command
character is optional.

The commands are:

    C-h (or BS) Print command summary
    C-z     Quit (asking confirmation if there are processes)
    a       Switch to process labeled A (and similarly with a thru z)
    A       Clear screen and then switch to process A
    C-n a   Create new process A as a subprocess (C-n A clears screen first)
    C-t a   Create process A at top level (C-t A clears screen first)
    C-k     Kill the current process (asks for confirmation)
    C-b     Buffer output for this process
    C-o     Discard output for this process
    C-p     Print output from this process
    C-w     Stop output from this process
    ?       List processes and output flags
             (* means current, +/- means waiting for output)
    C-\     Sends the command character to the current process
    DEL     Do nothing
    other   Sound the bell on the terminal
2 Qualifiers
When starting BOSS you can provide the following qualifiers:

/COMMAND_CHARACTER
 /COMMAND_CHARACTER=num
 Default: /COMMAND_CHARACTER=%O34 (i.e., C-\)

Use the character whose ASCII code is num as the command character instead
of C-\.  E.g.,
  BOSS/COMMAND_CHARACTER=%X1F   ! set command character to C-_
  BOSS/COMMAND_CHARACTER=%O37                   ! the same
  BOSS/COMMAND_CHARACTER=31                     ! the same
  BOSS/COMMAND_CHARACTER='F$CVSI(0,6,"_")'      ! the same
  BOSS/COMMAND_CHARACTER='F$CVSI(0,8,"`")'      ! set to ` (backquote)
Repeating the command character twice sends the character to the current
process.  C-z is disallowed as a command character since otherwise you
wouldn't be able to quit.

/START_PROCESS
 /START_PROCESS=(process-1,process-2,...)

BOSS immediately starts up the specified processes.  E.g.,
  BOSS/START_PROCESS=A
starts process A.  You are left in the last process specified; e.g.,
  BOSS/START_PROCESS=(E,D)
starts E and D and sets D to be the current process

/STUFF_STRING
 /STUFF_STRING=(string-1,string-2,...)

This qualifier is processed in parallel with /START_PROCESS.  string-n is
sent the process-n when it is started.  A carriage return is added to the
string unless the string is empty.  If the /STUFF_STRING list is shorter
than the /START_PROCESS list, then nothing is sent to the remaining
processes.  E.g.,
  BOSS/START=(E,D)/STUFF=EMACS
starts process E runs Emacs in it.  Then BOSS starts process D (and sends
nothing to it).  To send more than one command to a process, you can do,
e.g.,
  BOSS/START=(B,B)/STUFF=("SHOW TIME",FINGER)
which start process B and sends runs both SHOW TIME and FINGER.  (Or else
you can construct a DCL string with an imbedded carriage return.

/AUTO_STUFF_STRING
 /AUTO_STUFF_STRING=string

This specifies a string to stuff into each newly created subprocess.  A
carriage return is added to the string unless the string is empty.  This
gets sent to the subprocess before the strings specified by /STUFF_STRING
or BOSS$STUFF.  Top-level processes are unaffected by this qualifier.
There are three applications where this would be useful.  (1) If BOSS is
not installed with PHY_IO privilege (so that subprocesses don't
automatically inherit the parents terminal type), then use, e.g.,
  BOSS/AUTO_STUFF="SET TERM/VT100"
(2) If you are a privileged used and you want to be able to select any of
your authorized privileges in each subprocess, but you don't want them
turned on by default, then use
  $ DEFPRIV = F$GETJPI("","PROCPRIV")
  $ SET PROCESS/PRIV=ALL
  $ BOSS/AUTO_STUFF="SET PROCESS/PRIV=(NOALL,''DEFPRIV')"
This way each subprocess will have your standard set of current and
authorized privileges.  (Note that the authorized privileges for a
subprocess are set from the current privileges of its parent.)
(3) You want to turn off some classes of broadcasts in subprocesses.
  BOSS/AUTO_STUFF="SET BROAD=NOSHUTDOWN"
You will normally still receive such broadcasts when BOSS re-broadcasts
the broadcasts it receives to the current process.  However, you will only
receive one copy of each broadcast.  See also subtopic Broadcasts.

/OUTPUT_FLAGS
 /OUTPUT_FLAGS=(flag-1,flag-2,...)  flag-n is one of b, o, w, p

This qualifier is processed in parallel with /START_PROCESS.  The output
flag for process-n is set to flag-n.  If the /OUTPUT_FLAGS list is shorter
than the /START_PROCESS list, then the output flags for the remaining
processes are set to the default.

/DEFAULT_OUTPUT_FLAG
 /DEFAULT_OUTPUT_FLAG=flag (one of b, o, w, p)
 Default: /DEFAULT_OUTPUT_FLAG=b

This sets the default output flag.  See topic Output_flags.

/BEGIN_PROMPT
 /BEGIN_PROMPT=string
 Default: /NOBEGIN_PROMPT

This specifies the part of the DCL prompt which appears before the process
label.  E.g.,
  BOSS/BEGIN_PROMPT="--"/END_PROMPT=">> "
gives you DCL prompts of the form "--Q>> ".

/END_PROMPT
 /END_PROMPT=string
 Default: /END_PROMPT="> "

This specifies the part of the DCL prompt which appears after the process
label.

/SWITCH_CREATE
 /SWITCH_CREATE
 Default: /NOSWITCH_CREATE

By default, you have to create a process with either C-\ C-n x or C-\ C-t
x.  If /SWITCH_CREATE is set, then switching to nonexistent process
creates it as a subprocess.  (I.e., C-\ x is equivalent to C-\ C-n x).  If
you always want /SWITCH_CREATE set, then put
    $ setup boss
    $ boss == "''boss'/switch_create"
into your LOGIN.COM file.

/PROCESS_DEFAULT
 /PROCESS_DEFAULT=process-type (one of SUBPROCESS and TOP_LEVEL)
 Default: /PROCESS_DEFAULT=SUBPROCESS

This governs the types of the processes created by /START_PROCESS, process
switching initiated by BOSS$SWITCH.  (I.e., all process creation except for
via C-\ C-n x and C-\ C-t x.)

/FLOW_CONTROL
 /FLOW_CONTROL
 Default: /NOFLOW_CONTROL

Normally, everything you type is passed on to the current process.  This
includes the flow-control characters control-s and control-q.  This results
in some delay in these characters being acted upon.  Your terminal may
therefore receive many additional characters after a C-s is typed, causing
you to lose information off the top of your screen or your terminal's input
buffer to overflow.  With
    BOSS/FLOW_CONTROL
C-s and C-q are intercepted by the terminal driver and used as flow-
control.  This cause C-s to be acted on more promptly.  The drawback is
that you can never send C-s and C-q to your program.  This breaks certain
programs, notably Emacs, which need to be able to receive all the ASCII
characters.  A second drawback is that once the output is stopped with C-s,
only a C-q can get it going again.  You can't interrupt it with a C-y as
you can normally.  (This is because BOSS/FLOW_CONTROL only treats C-s and
C-q as special.  C-y and C-c are treated as ordinary characters.)

/DELETE_CHARACTER
 /DELETE_CHARACTER=num
 Default: /DELETE_CHARACTER=%O177 (i.e., DEL)

Use the character whose ASCII code is num as the delete character instead
of DEL.  This is useful on some terminals with weird keyboards.  E.g., on
some ADM terminals, the delete key is shift-underscore.  If you do
  BOSS/DELETE_CHARACTER='F$CVSI(0,8,"_")'
then underscore and delete are interchanged.  (I.e., the underscore key
sends a delete to your program, and the shift-underscore key sends an
underscore to your program.)

/UW
 /UW
 Default: /NOUW

Enter BOSS in multi-window mode.  You must be running the UW multi-window
terminal emulator on a Macintosh computer.  See topic Windows for more
information.
2 Terminal_types
When switching processes, BOSS tries either to clear the screen or to move
to the bottom of the screen.  By default, it uses VT100 escape sequences for
these operations.  However, if you define the logical name BOSS$TERM to be
the name of some other terminal, then it will use the escape sequence for
that terminal.

E.g., if you're using an ADM3A terminal, you should do
    $ DEFINE/NOLOG BOSS$TERM ADM3A
before starting BOSS.  (ADM3A users would probably also want to set the
delete character to underscore.  See topic /DELETE_CHARACTER.)

At present BOSS only knows about three types of terminals: VT100, VT52,
ADM3A, and UNKNOWN.  The last choice makes minimal assumptions about the
terminal, and should always give a reasonable display.
2 Process_types
BOSS deals with two types of processes: subprocesses and top-level
processes.

Subprocesses are what you get with the DCL command SPAWN.  They inherit
symbols and logical names from the parent process (i.e., BOSS itself) at
creation time.  The resources it uses count against the parent's quotas.
The number of subprocesses is governed by your subprocess quota.
Subprocesses share the job logical name with the parent process.  This gives
a way for subprocesses to communicate with one another and with their
parent.

Top-level processes acts just like an entirely new login session (as though
you had done SET HOST 0).  Indeed, you have to log in to get the process
going.  The resources that such processes use do not count against the
parent's quotas.  SHOW USERS will show that you are logged in multiple
times.

Which type of process should you use?

In most cases subprocesses are best.  These usually are quicker to get
started (since you don't have to go through the login procedure again).
BOSS is able to set the process name and DCL prompt to include the process
label.  Synchronous switching to another process from a subprocess is
possible using the BOSS$SWITCH and BOSS$STUFF job logical names.

When should you use a top-level process?  Here are some cases:
* You need to log in as someone else.
* You need to run a large program that uses all of one of your quotas.
* You need to run with a different CLI. Log in with e.g., /CLI=SHELL.
* Your subprocess quota is too low to allow you to create subprocesses.

Type C-\ C-n a to start subprocess A; type C-\ C-t b to start top-level
process B.
2 Output_flags
Each process has an output flag which may be set by C-\ followed by one of
C-b, C-o, C-p, or C-w (this sets the flag to b, o, p, or w, resp.).  This
flag governs what BOSS does to the output of a process which is not current.
(The current process always gets its output displayed immediately.)  The
meanings of these settings are

 b  Buffer output for this process.  Output is saved in a 4k buffer.  Buffer
    is output when the process becomes current.  The process hangs when this
    buffer fills.  This is useful for running a program which dribbles
    output which you do not want to lose.  In the process list (obtained by
    C-\ ?), a - indicates that there is output ready to be displayed, and a
    + indicates that the buffer is full (and the process is probably
    hanging).

 o  Discard output for this process.  Only the most recent write will by
    output when the process becomes current.  This is useful for running a
    program which periodically outputs some straightforward information such
    as `Processing record 103', where all you care about is the most recent
    output.  In the process list, + means that there is output available
    (but the process is continuing to run).

 p  Print output from this process.  Output is output to the terminal
    regardless of whether this is the current process or not.  This is
    useful if you need to be informed when a program completes.  Also it can
    be used to display status information periodically on your screen (see
    subtopic Examples).

 w  Stop output from this process.  The process can do a single write which
    will be accepted and saved by BOSS.  The process will then hang when it
    attempts to do the next write.  In the process list + means that there
    is output available (and the process is probably hanging).

The default output flag is b.  The default can be changed by using the
DEFAULT_OUTPUT_FLAG qualifier or by issuing one of the flag setting commands
when there is no current process (i.e., immediately after starting BOSS or
after logging out of a process).

The best setting of the output flag very much depends on your application.
You will probably find the best setting to be b (the default).  If one
process is attempting to act synchronously with another, it may be necessary
to set their output flags to w.  However, if your synchronous switches are
all performed via the BOSS$SWITCH mechanism, this isn't necessary since BOSS
temporarily sets the output flag to w on these types of process switches
(see topic Communicating).

A potential problem with the b setting is that BOSS empties the buffer to
your terminal in a single operation.  This may overflow your terminal's
input buffer (this is not a problem with a Mac running VersaTerm at 9600
baud).  This is not a problem if BOSS is used with the /FLOW_CONTROL
qualifier (assuming that your terminal does flow control).
3 Examples
Suppose TIME.COM contains:
    $ esc[0,8]=27
    $ sc = esc + "7"                    ! Save cursor
    $ rc = esc + "8"                    ! Restore cursor
    $ home = esc + "[;76H"              ! cursor to top right of screen
    $ invert = esc + "[7m"              ! inverse video
    $ revert = esc + "[m"               ! normal
    $10$:
    $ time = sc+home+invert+f$extract(12,5,f$time())+revert+rc
    $ read/prompt="''time'"/end=43$/error=42$/time_out=0 sys$command dummy
    $42$:
    $ wait  ::5
    $ goto 10$
    $43$:

This displays the time at 5 second intervals in the top right corner of
the screen.  If this is running in a process whose output flag is p, the
time will displayed while in other processes.
2 Communicating
BOSS and the subprocesses under it can communicate via logical names.  These
only work for BOSS's subprocesses, not for its top-level processes (because
only the subprocesses share the job logical name table with BOSS).  The
following are recognized:

BOSS$ID (in process table);  BOSS defines this as the identifying letter of
the process.  This can be used in tailoring the DCL prompt etc.;  e.g.,
    $ set prompt "boss-''f$trnlnm("boss$id")'>"
It can also be used to indicate to a program that it is running under BOSS.

BOSS$SWITCH (in job table); whenever BOSS is writes output to the real
terminal, it checks whether BOSS$SWITCH is defined.  If it's defined as a
single letter, BOSS will switch to that process and delete the logical name.
If the process doesn't exist it is created as a subprocess.  Thus a DCL
procedure can initiate a switch to process G with
    $ define/job boss$switch g
    $ write sys$error ""        ! do some output to make BOSS wake up
The switch takes place synchronously by setting the output flag for the
originating process to w temporarily (see topic Output_flags).  Both
BOSS$SWITCH and BOSS$STUFF should be defined as supervisor mode logical
names in the job table.  They may be defined from programs with e.g.,
    status:=lib$set_logical('BOSS$SWITCH','D','LNM$JOB');

BOSS$STUFF (in job table); whenever a BOSS makes a process initiated switch.
It stuffs the definition of BOSS$STUFF into the input stream of the process
being switched to.  After being used, BOSS$STUFF is deleted.
3 Examples
The following command procedure will do a SHO DEF and leave SHO DEF in the
recall buffer:
    $ cr[0,8] = 13
    $ define/job boss$stuff "sho def''cr'"
    $ define/job boss$switch 'f$trnlnm("boss$id")'

Here's how to switch to process F and have the present job continue
running:
    $ define/job boss$switch f
    $ char[0,8] = 22                    ! control-V
    $ gosub out_char
    $ return
    $!
    $out_char:                          ! Spit out the character
    $ read/prompt='char'/end=40$/error=40$/time_out=0 sys$command dummy
    $40$: return

If you want the present process to wait, then repeat the `gosub out_char'
three times.

Return paths may be implemented via additional logical names.  E.g., the
procedure that runs Emacs under BOSS does the following.

If Emacs isn't running (boss$emacs undefined) do
    $ define/job boss$emacs 'f$trnlnm("boss$id")'
and start Emacs.

If Emacs is running (boss$emacs defined) do
    $ define/job boss$return_switch 'f$trnlnm("boss$id")'
    $ define/job boss$switch 'f$trnlnm("boss$emacs","lnm$job")'
    $ gosub out_char
    $ gosub out_char
    $ gosub out_char

The suspend-emacs function in Emacs is redefined to do the equivalent of
    $ define/job boss$switch 'f$trnlnm("boss$return_switch","lnm$job")'
    $ deassign/job boss$return_switch
    ...

Similarly boss$return_stuff may be used as the string to stuff into the
process on return.  The edit procedure that is called on a TeX error may
set this to the current TeX command line so that on exiting from the
editor the user has the input buffer prepared with the command to re-run
TeX.  The user then has the option either of accepting the command (by
typing return) or cancelling it (with C-u).
2 Broadcasts    
When running running under BOSS, there is the potential that you will
receive multiple copies of the same broadcast.  In order to understand what
is going on, it is useful to distinguish 3 types of broadcast messages:

(1) Broadcasts to a specific process.  E.g., the response of the system to
control-t.  These typically are sent to one of the processes under BOSS.

(2) Broadcasts to top-level processes.  E.g., mail notification.  These are
typically sent to the process running BOSS and any top-level processes
under BOSS.

(3) Broadcasts to all terminals (including pseudo terminals).  E.g.,
shutdown messages.  These are typically sent to the process running BOSS and
all processes under BOSS.

In order to help manage broadcast messages, BOSS intercepts any broadcasts
sent to the process running BOSS, and rebroadcasts them to the current
process.  The rebroadcasts are of type USER16.  This allows you to shut
these rebroadcast out with SET BROAD=NONE or SET BROAD=NOUSER16.  Control-s
also works to defer broadcasts.  Any broadcast handlers which the current
process has active will be called to process the broadcast.

In order to avoid getting multiple copies of the same broadcast, here's what
you should do:

In each subprocess under BOSS, disable type 3 broadcasts, i.e., do
    SET BROADCAST=NOSHUTDOWN    ! plus others maybe?
You can accomplish this automatically with the /AUTO_STUFF_STRING qualifier
to BOSS.

In each top-level process, disable type 2 and 3 broadcasts, i.e., do
    SET BROADCAST=(NOSHUTDOWN,NOMAIL,NOQUEUE,NOPHONE)   ! plus others?
This assumes that you are logged into the top-level process under the same
username.  If using a different username, then you wouldn't want to disable
most (all?) of the type 2 broadcasts.  For example, we would want to permit
mail notification.

In order to stop broadcasts to a particular process, do
    SET BROADCAST=NONE

There are some drawbacks with way BOSS rebroadcasts messages:

* There is no way of determining the original type of the broadcast was
(MAIL, PHONE, etc.).  For this reason, BOSS rebroadcasts everything as
USER16.

* If the rebroadcast fails, because the current process has broadcasts
disabled, then there is no way of getting this information to the original
sender.  E.g., if you SET BROAD=NONE is a process under BOSS and someone
tries to PHONE you, he will not be notified that you're not getting his
connection requests.
2 New_features
(1.7) Incompatible change: C-\ C-n x required to create a new process.  Use
BOSS/SWITCH_CREATE to get the old behavior (where C-\ x would create process
X if it doesn't exist).

(1.7) C-\ C-t x creates a process at top level.  See topic Process_types.

(1.8) BOSS accepts various qualifiers when it starts.  These control the
command character, DCL prompt string, etc.  They also can be used to tell
BOSS to start various processes.  See topic Qualifiers.

(1.9) Broadcast messages sent to the process running BOSS are trapped and
rebroadcast to the current process.  See topic Broadcasts.

(2.0) /DELETE_CHARACTER=num added to allow interchange of some character
with delete.  See topic /DELETE_CHARACTER.

(2.1) Logical name BOSS$TERM looked at to determine terminal type.  See
topic Terminal_types.

(2.2) BOSS fixed to work with new release of pseudo TTY drivers.

(2.4) /FLOW_CONTROL added to allow flow control by the top-level process.
See topic /FLOW_CONTROL.

(2.5) /PROCESS_DEFAULT=process-type added to get top-level processes
created by default.  See topic /PROCESS_DEFAULT

(2.5) C-\ C-k kills the current process.

(2.5) BOSS/UW acts as a server for the multi-window Macintosh terminal
emulator UW.  See topic Windows.
2 Bugs
BOSS does single character input.  This is rather slow.  Don't expect it to
be able to keep up with lots of data coming from the terminal.

The output on some terminals (Visual 550s in particular) at 9600 baud may
have glitches in it.  This is because these terminals need flow control
enabled to operate at 9600 baud, but BOSS doesn't react quickly enough to
the control-s sent by the terminal.  The solution is to run at 4800 baud or
slower or to use the FLOW_CONTROL qualifier to BOSS.

I have seen various strange bugs occurring when using BOSS.  These are all
associated with VMS running out of some quota.  The symptoms range from BOSS
hanging while creating a process (because LIB$SPAWN does not return) to
SYS$LIBRARY being mis-translated by LINK.  As far as I can tell these
problems occur only because of the additional stress multiple running jobs
puts on a users quota's and not because of BOSS problems per se.  The
culprits is usually BYTLM (8000 is too low, 40000 is OK).  However PGFLQUO
is another quota to check.

Output gets garbled when using BOSS via SET HOST (i.e., SET HOST followed by
BOSS).  This happens when you type while output is coming to your terminal.
The symptom is that the lines come out in the wrong order.  It's OK to use
SET HOST while in BOSS (i.e., BOSS followed by SET HOST).

I know of one program SMP (an algebra system) that grabs the entire PGFLQUO
on startup.  This obviously interfers with BOSS's other processes.  The
solution is to use a top-level process to run SMP (see topic Process_types).

PC file transfer using the XMODEM protocol (e.g., with MACX) doesn't work
through BOSS.  Kermit seems to work fine.

Attempting to attach to the process running BOSS from one of its
subprocesses causes a hangage.

Control-\ is used by the Switcher program on the Macintosh.  If you are
running your terminal emulation program under Switcher, you need to check
`Disable keyboard switching' in the Options menu item in Switcher.
Alternatively you can select a different command character with the
COMMAND_CHARACTER qualifier.
2 Windows      
If you are running the UW multi-window Macintosh terminal emulator, then you
can run BOSS with

    $ BOSS/UW

and take advantage of a multi-window environment for communicating with the
VAX.  (UW stands for Unix Windows.)

Up to seven processes can be run.  Each process is identified by a single
digit 1 thru 7.  This digit is used in the process name and in the DCL
prompt.  Each process is associated with its own window, named Window #1,
etc., although the names can be changed within UW.

Before you run BOSS/UW, the UW terminal emulator will be operating in
single-window mode.  When you start BOSS/UW, this window will close.

DON'T run BOSS/UW if you're not using the UW software on the Macintosh!

You create a window and associated VAX process by selecting New in the
Windows menu.

You can select a window by clicking on it (if a portion of it is visible),
typing command-1 thru command-7 (for windows 1 thru 7), or by selecting Open
in the Windows menu.

You can close a window by clicking on its close box or by selecting Close in
the Windows menu.  The associated VAX process remains running.  You can view
the output at a later time by selecting the window.

When you log out of a process, the window disappears.

Selecting Shutdown from the File menu causes BOSS to exit and UW to return
to single window operation.

Finally, UW also supports Option as a Meta key and high-level mouse support.
Both these are useful in Emacs.  See subtopic Emacs.

WARNING: UW is a less capable terminal emulator than VersaTerm.  Don't
expect too much of it!  It does however support multiple windows to
different processes; the lack of this in VersaTerm is its principle defect.
3 Configuration
Read the MacWrite documentation on UW for more information.

In UW you can set both the default Window configuration used when a new
process is created (Configure menu) and the configuration of the active
window (Settings in the Window menu).

I suggest the following default configuration:

  (a) Serial Port: set Flow control on
  (b) Protocol: set to "Original UW protocol"
  (c) Keyboard: set "META key"
  (d) Window Defaults: set "ANSI" 
      (d') Set TTY Defaults: set "Mouse Action" to "Clipboard"

Save this configuration as uw.conf. (Then you don't need to repeat it each
time you start up.)
3 UW_availability
UW is available in the <INFO-MAC> area at SUMEX.STANFORD.EDU.  It's in
Unix shar format in files UNIX-UW-42-PART%.SHAR (PART1 thru PART8).

At a minimum you need the UW terminal emulator and (if you have Emacs
users) MACMOUSE.EL.

At PPL, the terminal emulator and documentation are in
    MAC$:[NEW]UNIX-UW-42.HQX
(in BinHex format).  MACMOUSE.EL is in the default library area for Emacs,
EMACS_LIBRARY:[LISP].
3 Emacs
In order to run Gnu Emacs under UW, you need to set you Emacs terminal
type to "uw", with e.g.,
    $ setup emacs uw

The option key acts as a Meta-shift.  Thus Option-F is the same as ESC F
(i.e., goes forward a word).

You should set UW to transmit the location of Mouse clicks to the VAX (in
Configure TTY under Settings in the Window menu).  This gets the mouse
click transmitted to the VAX for this window only.  To get Emacs to
understand what UW sends, insert

    (global-set-key "\em" 'move-mac-cursor)
    (autoload 'move-mac-cursor "macmouse" nil t)

into your Emacs init file (sys$login:.emacs).

Here's what happens with mouse clicks:

 Up or down mouse button in a window selects that window

 A scroll bar/thumbing area for each window with the following features:
      the mode lines are horizontal scroll bars
          (running from rightmost column to under leftmost column)
      the unused right window bar and the dividing lines between
          windows are vertical scroll bars
          (running from top of window THRU modeline
  for vertical scroll bars:
        click at line 1 does previous page
        click at last line does next page
        click anywhere else "thumbs" to the relative portion of the buffer.
        shift-click at line 1 scrolls one line down
        shift-click at last line scrolls one line up
        shift-click elsewhere moves line to top of window
        option-shift-click elsewhere moves line to bottom of window
  for horizontal scroll bars:
      click at column 1 does scroll right one window width
      click at last column does scroll left one window width
      click anywhere else moves to that "percent" of the buffer width
      shift-click at column 1 scrolls one column right
      shift-click at last column scrolls one column left
      shift-click elsewhere moves column to right of window
      option-shift-click elsewhere moves column to left of window

There is also basic positioning and kill-buffer support:
        click in a buffer moves dot there and selects that buffer
        drag copies the dragged region to the kill buffer
        shift-drag deletes the dragged region to the kill buffer

  It is possible to use the scrolling and thumbing area to make the region
  larger than a single screen; just click, scroll, release. Make sure
  that the last scroll is just a down event; the up must be in the buffer.
  The last mouse position is remembered for each different buffer (not
  window), and thus you can start a drag in one buffer, select another,
  go back to the first buffer, etc.

        option-click yanks from the kill buffer
        option-shift-click similarly yanks from a named buffer.
3 Other_features
Most of the capabilities of BOSS in its regular mode are available.
However, there are some differences in BOSS/UW

Only 7 processes can be run (instead of 8).

The processes are named 1 thru 7 not A thru Z.

BOSS/FLOW_CONTROL is used to be set (independent of what you actually ask
for).  Note that under UW the use of flow control by the Macintosh
hardware to prevent data overruns of the Mac's buffers is carried out
independently of your attempts to control output with C-s and C-q.  In
particular, C-s and C-q can be used for their regular functions in Emacs,
even though the Macintosh and the VAX are still using flow control.

BOSS/UW sets the default output flag to p (instead of b).  This allows
output from all processes to be sent to their respective windows.  This
default be overridden with DEFAULT_OUTPUT_FLAG qualifier.  And of course
you can use C-\ C-b, etc., to set this flag on a per-process basis.

BOSS/NOCOMMAND_CHARACTER can be used to indicate that no command character
is to be used.  (Thus all characters you type get seen by your VAX
process.)  By default, C-\ is still used as a command character.

BOSS doesn't print "[Switch to process 5...]" messages, since the
switching is obvious from the arrangement of windows.  Other messages
(e.g., the response to C-\ ? should appear in the active window).

C-\ 3 will tell BOSS to switch to process 3, but UW won't bring that
window to the front.  The same comment applies to process-initiated
switches (via the BOSS$SWITCH logical name.  You should probably use one
of the other methods for switching processes (clicking on the window,
command-3, etc.)

BOSS/PROCESS_DEFAULT=TOP will cause BOSS's processes to be top-level
processes.  Thus when you select New in the Windows menu, you will see a
Username: prompt.

You can create processes with C-\ C-n 4 or C-\ C-t 4 (for subprocesses and
top-level processes).  This allows you to create either type of process,
while selecting New in the Windows menu produces only a process of the
default type (governed by BOSS/PROCESS_DEFAULT).

BOSS/START=(1,2)/STUFF=Emacs will create processes 1 and 2 and start Emacs
in process 1.  This is just the same as BOSS behavior in its regular mode.
3 Misfeatures
Occasionally BOSS loses track of what UW thinks is the active window.
Your typed input will then be sent to the wrong process.  This is
corrected by switching to some other window (e.g., by clicking on it) and
then switching back to the original window.

Other than the fact that UW supports multiple windows and more intelligent
mouse behavior with Emacs, UW is a much worse terminal emulator than
VersaTerm.  In particular:

* It doesn't save what scrolls off the screen.

* I haven't been able to get EVE or LSE to work reasonably.  I presume
  there's some way of telling these programs what UW can do (via
  TERMTABLE);  I just haven't managed to get it to work right.  Emacs
  works just fine though.

* Keypad is not supported.

* Arrow keys don't work.

* UW implements a Tektronix 4010 emulation, but it's a pretty miserable
  affair.

* Can't print.

* Can't do file transfers.

I've only implemented the most basic level of UW service under BOSS.  The
next level allows windows to be retitled from the VAX, as well as setting
many of the other attributes of windows.  This will most likely not get
implemented.

The main reason for implementing the UW features in BOSS was to show that
the Macintosh can provide a multi-window enviroment for the VAXes.  Now we
have to get Lonnie Abelbeck to modify VersaTerm to support the UW
protocol...
2 Acknowledgements
BOSS was written by Charles Karney based on the PHOTO program written by
Asbed Bedrossian of USC.  It utilizes the Pseudo TTY package of Dale Moore
of CMU and Kevin Carosso of Network Research Co.

UW, the multi-window Macintosh terminal emulator was written by John D.
Bruner of LLNL.  The Emacs mouse support was written by Gregory S. Lauer of
BBN.

Bugs, questions, etc. to
    Charles Karney
    Plasma Physics Laboratory   Phone:   +1 609 243 2607
    Princeton University        MFEnet:  Karney@PPC.MFEnet
    PO Box 451                  ARPAnet: Karney%PPC.MFEnet@NMFECC.ARPA
    Princeton, NJ 08543-0451    Bitnet:  Karney%PPC.MFEnet@ANLVMS.Bitnet
