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

    $ boss :== $usr:[utility]boss

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

    $ boss

BOSS was written by Charles Karney based on the PHOTO program written by Asbed
Bedrossian of USC.  It utilizes the Pseudo TTY package of Kevin Carosso of
Hughes Aircraft Co.

Bugs, questions, etc. to Charles Karney (Karney@PPC).
2 Description
BOSS lets you create up to 8 processes each of which 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'.  This means
that 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 cannot do
output.  (Output is saved until you make that process current.)  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.

You can run any program under BOSS.  For example, you might
    run Emacs or EVE                   in process E
    SET HOST to the EPX                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
back 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 the VT100 escape sequences for clearing the screen, etc.  However
it should still be useable on non-VT100-compatible terminals.
2 Commands
Usually, all commands to BOSS begin with the C-\ (control-\).  The exception
is when there is no current process (i.e., initially and immediately after
logging out of a process).  In that case the C-\ is optional.

The commands are:

    C-h (or BS) Print command summary
    C-z         Quit (asking confirmation if there are processes)
    a thru z    Switch to a particular process (starting it if necessary)
    A thru Z     the same except clear the screen first
    ?           List processes (* means current, + means waiting for output)
    C-\         Send a real C-\ to the current process
    DEL         Do nothing
    other       Sound the bell on the terminal
2 Communicating
BOSS and the processes under it can communicate via logical names.  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.
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

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 3
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 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 a Visual 550 at 9600 baud occasionally has glitches in it.
This is because the Visual 550 needs 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.

BOSS sometimes hangs when it runs out of BYTLM.  I believe this is caused by
LIB$SPAWN never returning (instead of returning with an error code).  Make
sure your BYTLM is high enough.  (It appears that 8000 is too low.  40000 is
adequate.)

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).

PC file transfer (e.g., using MACX, XMODEM) probably doesn't work through
BOSS.  (Actually I have got downloads to work with MACX.  That presumably is
an accident of the Mac not sending a C-\ as part of the handshaking.
Uploads seem to stall.)

Attempting to attach to the process running BOSS from one of its
subprocesses causes a hangage.
2 Unfeatures
The following features are not implemented but are possible future
enhancements.

* Log files.
* Largish output buffer for non-current processes (have to worry about
  controlling the output though).  Sending a C-s won't work.
* Ability to kill particular processes.
* Ability to ATTACH to non-BOSS processes.  I haven't managed to make this
  work yet.
* Configurable for other terminals.
* Allow default directory to propagate to other processes.
