1 HOST
 HOST allows communication and ASCII file transfer between the
 UWPhysics VAX and other computers.  Allows use of Ward Christensen's
 MODEM7 protocol for self-correcting binary and ascii file transfer.
 See HELP HOST MODEM7 .
 For ACC CYBER communications see HELP CYBER_VAX SEND
 which makes the VAX a Remote Batch Facility on the CYBER.
 Format:
          HOST

 An accounting file is kept for long-distance charges.
 Remember to dial 9 first if you are dialing
 more than 5 digits (an "off campus" call).  And 1 if long distance.

 For full information, PRINT ULIB:[HOST]HOST.DOC .
 It would be wise to have the document in front of you when you
 use the program as there is no HELP inside HOST.

 If you can't send a NUL character (octal 000) from your terminal you may
 $ DEFINE  HOST_BREAK_CHAR  nnn
 where nnn is the octal code for the character you want to use instead.
 See HELP ASCII for the codes.

 See also HELP TELEPHONE and HELP TELEPHONE OTHER for numbers.
2 Details
 HOST will  allow you to connect to a remote computer over phone lines at
 300 or 1200 baud or to a directly connected local
 computer at 110, 300, 1200, 2400, 4800, or 9600 baud
 and will transfer ASCII files.  This  program itself does not support any
 error detection or correction, though it can be used with MODEM7 to
 transfer files with automatic retry on errors.
 FOUR users at a time may run the HOST program by using the four different
 dial-out ports TTA3, TTA4, TTL4, TTL5.  They are automatically selected
 and HOST will tell you if none is available.  NOTE: TTL4 and TTL5
 do NOT support Vadic protocol !  See HELP HOST MODEMS.
2 Autodial
  HOST can automatically dial the phone.  It eases the dialing
process by talking to the modem itself, you just type in the
phone number or some name for the remote computer that you choose.
Or you can define the phone number permanently.
This relieves you of having to know each modem's commands.
Incidentally, it adds the actual phone
number dialed to the .LOG file kept for accounting long distance
calls.  This allows us to match the cost to a username more easily
when the phone company bill comes.

Optionally, if you only dial one number, you can include e.g.
$ DEFINE  HOST_#  "5-4913"
in your LOGIN.COM command procedure file
and you will never have to type the number again.

You may also type strings of your own choosing to identify the
phone number you want dialed.  Put lines like
$ DEFINE  HOST_#_C  "5-4913"
$ DEFINE  HOST_#_VAX  "5-2431"
$ DEFINE  HOST_#_M  "MANUAL"
into your LOGIN.COM command procedure file, then at the NUMBER:
prompt, respond with a "C" for Cyber or "VAX" for VAX and HOST will
find the right phone number.  Or if you type "M" you can talk
directly to the modem.

Possible responses to the NUMBER: prompt are of course phone numbers,
and EXIT or QUIT or STOP or CTRL-Z to exit from HOST,
MANUAL to connect directly to the modem for 'manual' dialing.

Thanks to Jim Gladden of UW Chemistry for the basic autodial routine.
2 Chunky
  HOST has been sped up by a
factor of 10 or more so it no longer hogs VAX CPU time when just
displaying a file from a remote computer. The speedup was
accomplished by switching into a faster mode when characters are
being transferred faster than about 40 characters per second.
This faster mode has some inconveniences, however, which is why
it is not used for all transfer rates.  When the threshold is
exceeded, HOST starts transferring in chunks of about 20
characters instead of its normal one character per operation. 
This reduces the CPU time overhead of setting up a transfer
operation for each character.  The disadvantage is that if you
are typing on the keyboard at the same time, your characters will
not echo as you type them, but when the VAX displays the
20-character chunk of which they are a part. This should not
usually be a problem as it only happens when characters are
coming over 40 per second. So the delay is under half a second. 
Also the blocks appear on your screen with irregular timing,
which may be disturbing if you are trying to read the screen as
it updates.  The final difficulty is that there is currently up
to a 2 second delay when switching modes. This means that when
you stop a display, up to the final 20 characters may not show up
on your screen for 1 second as HOST adapts to the new slower
(stopped) rate of transfer and the next few characters you type
may not show up for another second.  For slower typing,
HOST will act the way it used to.

Thanks are due to Scott Peabody of UW Chemistry for the basic speedup.
2 MODEM7
Allows MODEM7 compatable programs on other computers to transfer
binary or ASCII files with CRC or checksums to or from this VAX.
Format:
	MODEM7 option  file-spec

It keeps a log file in current directory or your main directory
if there are errors.
To enable this command, put the line
$ @ULIB:[CPM]CPM.COM
into your LOGIN.COM command procedure file.
3 options
The current options are
        S       Send ANY File from the VAX
        R       Receive ANY File to the VAX
   suboptions
        T      VAX/VMS Text File to/from CP/M text file
                  (file is internally converted to/from CP/M format)
        C      Use CRC rather than checksum
        B      Batch mode (i.e. multiple files in one command)
3 Examples
Assuming you have XMODEM runnable on a remote system,
and a direct or modem connection to the VAX,
then to perform a transfer you would on the VAX:

Use the HOST program to dial in to the remote system and log in there
                             emulating a terminal on the remote system.

A>xmodem  s  ulib:[cpm]help.com   run XMODEM telling it to send the named
                                  file to the VAX
CTRL-@                            gets attention of HOST program
V                                 use VAX command to leave HOST
                                  maintaining modem connection
$ modem7  r  help.com             tell MODEM7 to recieve the file on
                                  your CP/M system
 
To send a file to the remote system:
A>xmodem  r  spec34a.dat          tell XMODEM to receive file
CTRL-@                            get back to DCL $ prompt
V
$ modem7  s  spec34a.dat          tell MODEM7 to send file to remote
 

TEXT example assuming you have accessed a CP/M system via HOST:
A>XMODEM  RBC                     tell XMODEM to receive
                                  multiple text files with CRC checking
                                  (no filenames since sender will supply)
CTRL-@                            get HOST attention
V                                 and exit
$ modem7  SBT  thesis*.cpm        tell MODEM7 to send the files.
                                  (not say CRC since receiver determines)
				  When each transfer is complete,
				  XMODEM will automatically convert
				  the file to a VAX text file.
 
TEXT example, assuming you have accessed the CP/M system via HOST:
A>XMODEM  SB  thesis*.cpm             tell XMODEM to send multiple text files
                                      (not say CRC since receiver determines)
CTRL-@                                to get HOST attention
V
$ modem7  RBCT                        tell MODEM7 to receive the files
                                      with CRC checking and text conversion
                                      (no filenames since sender supplies)
3 FROMXMOD
OBSOLETE (but included in case you forget to use the T option).
Converts from CP/M file (continuous stream of bytes in 128 character
records with embedded CR LF) to VAX editable file (one line per
record carriagecontrol='LIST').
     Format:
             FROMXMOD  infile  outfile
3 TOXMOD
OBSOLETE (but included in case you forget to use the T option).
Converts from VAX text file (one line per record, no CR LF)
to CP/M form (one line per record, CR LF added at end of line)
ready for transfer to CP/M system using XMODEM.
     Format:
             TOXMOD  infile  outfile
2 IBM
 IBM mainframes cause difficulty in file transfers and session logging
 since they insist on direct cursor addressing instead of CRLF at end
 of lines.  This can be handled somewhat by noticing that if the
 number of characters from the remote IBM is over a maximum line length
 (settable with the HOST "Change" command) the HOST program automatically
 starts a new line.  The received or logging file will, however, be
 full of cursor addressing escape sequences, and so must be edited with
 an editor such as EDT that displays control characters to make the file
 look reasonable.  The default line-length is 250 characters to keep
 the file editable with EDT.  All-in-all it is recommended that if
 KERMIT is available, that it be used for file transfer instead of using
 the session logging method.
2 FNAL
 There is a non-standard prompt character "/" on the FNAL CYBER.
 So to transfer files, you must first tell HOST that character:
    Use the C(HANGE) command to change the R(emote prompt) to / .
    Remember to type RETURN.  Then you may use the S(END) command
    normally.
 Alternatively you can put the line
 $ DEFINE HOST_PROMPT "057"	! octal ascii code for "/"
 into your LOGIN.COM command procedure file.

To transfer files to the CYBER the file must be created "permanent".
2 Logical_names
HOST responds to logical names you define in your LOGIN.COM.
Note: the quotes are important if you use special characters.
$ HOST_MODEM  "modem"   (our modems are TTA3,TTA4,TTL4,TTL5 but
                         you may use a blank character " " to
                         indicate you want HOST to choose
                         { already done by System Manager }
                         or "X" to get a prompt at run-time)
$ HOST_SYSTEM "name"   (name may be CYBER,VAX,PDP/RSX,PDP/RT,UNIX)
$ HOST_PARITY "parity" (parity may be FULL,HALF,NONE)
$ HOST_DUPLEX "duplex" (duplex may be HALF,FULL)
$ HOST_#  "phone number"  (any valid phone number incl. K,-,(,)  )
$ HOST_#_string  "phone number"  (string may be up to 20 characters
                        several of these definitions may exist,and
                        when you get the NUMBER: prompt you type
                        the string instead of the phone number)
$ HOST_HAND  "nnn"   (octal representation of ascii character used
                      during file transfer by remote to signal
                     "ready for next line")
$ HOST_PROMPT  "nnn"  (octal representation of remote prompt
                       used during setup of file transfer)
$ HOST_BREAK_CHAR "nnn"  (octal representation of HOST attention character)
$ HOST_BAUD_RATE "nnn" (Baud rate of the modem that you are calling).
2 Manual_Dial
 When HOST is run, it will ask you several self-explanatory questions
 to set suitable parameters.  After answering them, your terminal
 will be connected to the dial-out modem.  To dial "manually" you must
 respond MANUAL at the NUMBER: prompt.

 Type a control-E and carriage return to get the modem intelligence's
 attention.  It will respond with
 HELLO I'M READY
 *
 You may now type in single letter commands (terminated by return)
 to the dial-out modem.  See HELP HOST MODEM for complete information
 on commands.  You can get-by with the following command
 D (return)  selects Keyboard Dial Mode (what you type will NOT be
                                                displayed)
 you will be prompted
 NUMBER?
 Type the number as it would be dialed (you may include dashes for
 readability or 'K' for a 5 second delay) it may or may not
 echo as you type depending on which modem you are using.  Press
 RETURN key.
 The number will then display for your approval if it did not echo.  You
 may have to press RETURN to actually dial the number
 (anything else will abort).
 it will then display
 DIALING:
 and dial the far computer.  Depending on which modem you are using,
 messages indicating call progress or error conditions may appear.
 When connection is made, the modem will print
 ON LINE
 and turn off its intelligence, allowing you to talk directly to the
 far computer (if it fails it will display FAILED CALL).
 You may need to press return one or more times to get the attention
 of the far computer.
 
 You will are now connected to the remote system.
2 NUL 
 When you have established the connection to your  remote  system  all
 subsequent  terminal input, with only one exception, is sent directly
 to the remote system.  Login on the remote system  and  do  what  you
 like.  The exception is when a NUL (ASCII code 0) character is typed.
 This is a control-space-bar on a VT-100 or ADM-3 and also a
 CTRL-@  on  an ADM-3 or Z-19
 (look carefully, on Z-19 that is CTRL-SHIFT-2)
 or CTRL-SHIFT-0 on Hazeltine 1500.
 This character is intercepted by HOST and allows you to enter commands
 to HOST to  transfer  files  or perform various other functions.
 If you can't send a NULL character from your terminal you may
 $ DEFINE  HOST_BREAK_CHAR  nnn
 where nnn is the octal code for the character you want to use.

 See HELP HOST COMMANDS for a list of the HOST commands.
2 Commands
 HOST normally sends all terminal input directly to the remote system.
 However,  if  you type an attention-getting character (which can be set) 
 which is normally a NUL (ASCII code 0) (CTRL space-bar on a
 VT-100, CTRL-@ on an ADM3 terminal, CTRL-0 on a Hazeltine 1500
 CTRL-SHIFT-2 on Z-19),
 the NUL character is not sent to  the  remote system.
 Instead, HOST prompts you for one command to HOST itself.
 The commands are:
!        HELP    ;help on modem commands.
        EXIT    ;exit from HOST, returning you to the VAX,
                ;and freeing the line
        VAX     ;exit from HOST, returning you to the VAX,
                ;but leave the connection to the remote system
                ;for later return (don't do this for long).
        RECEIVE ;receive ASCII file from remote system to VAX.
        SEND    ;send ASCII file from VAX to remote system.
        DELAY   ;sets inter-character delay for SEND command transfer.
        CHANGE  ;change remote system or prompt, baud rate, parity, or
                ;duplex(full/half) or ignore NUL character
                ;without leaving HOST
        BREAK   ;sends a BREAK to the remote computer.
        TURN    ;turn on session recording in file
 Further information on these commands, see the document or
 HELP HOST command  .
 To set the attention-getting character put the line 
 $ DEFINE  HOST_BREAK_CHAR  octal-number  
 in your LOGIN.COM file where octal-number is
 the new attention-getting character's octal representation. 
2 Systems
 Several types of remote system are supported.  By this  is  meant  that
 suitable values for the DUPLEX and PARITY are provided, and when
 file transfer to or from the remote  system  is  requested,  all  the
 commands necessary to set up suitable terminal characteristics on the
 remote system and make the file transfer, are issued automatically.
 
 The remote system type should be entered as a character string.   The
 supported types of system are:
             VAX/VMS
             CYBER
             PDP/RSX         PDP-11 running RSX-11M
             RT/PDP          PDP-11 running RT-11
             UNIX
!             OLD/VAX         uses the old character-by-character transfer
 For any other system, or if the user wishes to  issue  all  the  file
 transfer commands to the remote system himself;  the system type
             OTHER
 must be used.
2 BREAK
  Sends a BREAK signal to the remote computer
  simulating the BREAK key on the terminal.  This signal is necessary
  to get the attention of some remote computers such as IBM. 
2 Session_logging
  When session logging is TURNed on, you will be asked whether you
  want to append to an existing file or create a new one and asked for
  the name of a file on the UWPhysics VAX, which will be used to 
  record your entire session with the remote computer.  Both
  commands you type in to the remote computer (for Full Duplex
  connections) and responses from the remote system will be 
  recorded.
2 TURN
  When session logging is TURNed on, you will be asked whether you
  want to append to an existing file or create a new one and asked for
  for the name of a file on the UWPhysics VAX, which will be used to 
  record your entire session with the remote computer.  Both
  commands you type in to the remote computer (for Full Duplex
  connections) and responses from the remote system will be 
  recorded.
2 Filetype
  ASCII files such as programs may be transferred with HOST.  Files should
  have the attribute 'CARRIAGE RETURN'.  Files with attributes
  'FORTRAN CARRIAGE RETURN' or 'NONE' will not transfer correctly.
  You may transfer binary files using the MODEM7 program.
  See HELP HOST MODEM7
2 EXIT
 This command causes the HOST program to exit, returning  you  to  VAX
 command  level.  This command does not log you off the remote system.
 The phone will be hung up. You should
 log off the remote system before EXITing HOST.
2 VAX
 This command causes the HOST program to exit, returning  you  to  VAX
 command  level.   In  this  case, the connection to the
 remote system is not broken.  Use of this command is not recommended,
 because  the  modem  line is still owned by you,
 thus preventing anyone else from using the HOST program.
 But this is necessary to use the error correcting file transfer program
 MODEM7.
2 RECEIVE
 This command allows a file  transfer  to  the  VAX  from  the  remote
 system.  You must be logged in on the remote system.
 
 For all supported systems you will be prompted for a destination file
 name on the local VAX and the source file name on the remote machine.
 The  file  will  be  typed  out  at  the  terminal  as  it  is  being
 transferred.   Typing  any  character  on  the  terminal  during  the
 transfer will terminate the transfer prematurely.  When the file  has
 been  typed  out  completely you should then press the RETURN key, or
 any other key, and this will terminate the  transfer  and  close  the
 received file.
 
 To receive a file from some other  unsupported  system  you  will  be
 prompted  for  the  destination file name on the local VAX.  You must
 then issue commands to the remote system to type the source file  out
 on  the  terminal.   The file will be transferred to the VAX as it is
 typed out on the terminal.  To terminate  the  transfer  prematurely,
 type  whatever you normally type on the remote system to stop typeout
 and return to command level.
2 SEND
 This command will transfer a file from the VAX to  a  remote  system.
 You must be logged in on the remote system.
 
 For supported systems you will be prompted for the source  file  name
 on  the local VAX and the destination file name on the remote system.
 Optionally, the file may be typed out on the terminal as it is  being
 transferred but this takes more local VAX CPU time. The file transfer
 will terminate automatically at end
 of file and the file on the remote system will be closed.
 To terminate the transfer early, you may type any key, preferrably
 the abort key for the remote system so it terminates too.
 
 For unsupported systems you will be prompted for the source file name
 on  the  local  VAX.   However  you  must then issue a command to the
 remote system to copy terminal input to  a  file.   This  must  be  a
 single  command  which  terminates with the first carriage return, at
 which time HOST will begin sending the file.  You must then  issue  a
 command  to  the remote system to close the file.  The
 HOST program sends each record of a  file,  followed  by  a  carriage
 return.  The next record is sent when the remote system has responded
 with a line feed (or other specifiable character
 see HELP HOST LOGICAL_NAMES)
2 CHANGE
 The CHANGE command allows you to change various parameters while
 in the HOST program.
 System
 Prompt
 Baud rate
 Parity
 Duplex(full/half)
 Number of characters in block mode transfers
 Maximum size of records in receive and session log file
 Ignore characters NUL and/or CR from remote to file
             (toggles between "ignore" and "file")
2 Errors
 Occasionally you may find that 
 you have a connection to a remote computer already established.  (The
 automatic disconnect of the previous  HOST  user  has  failed).   You
 should  exit  from  the HOST program, wait 30 secs and try again.
 
 If you get the message
           ERROR ON ALLOC MODEM
 then the chosen modems are in use.
2 Modems
 This section remains to be finished.  Complain to LIBRARY.
 NOTE: TTL4 and TTL5 do NOT support Vadic protocol.  If you want to
 talk to an exclusively Vadic protocol modem, you must use DEFINE as below.
 The dial-out modems are on ports TTA3, TTA4, TTL4, TTL5
 $ DEFINE  HOST_MODEM  port
 in your LOGIN.COM will specify the port.  Or " " as the port will
 let HOST decide.  Or no definition will allow the system to decide.
 Or "X" will cause HOST to prompt for the name.

 Modem commands TTA3 & TTA4  (TTL4 & TTL5 are slightly different)
 ctrl-E return          get attention of modem intelligence
 D return       dial    dial from keyboard
 S return       store   store numbers (erases old numbers)
 M return       memory  display stored numbers 
 1 return               dial first stored number 
 .
 .
 .
 9 return               dial ninth stored number
 R return       redial  dial number repeatedly
 P return       print   display menu of these commands (i.e. HELP)
 I return       idle    turns off modem intelligence
2 UWATS
To use UWATS:
 Call the University Telecommunications office and ask for the tones
 to be removed from your UWATS authorization number (they are VERY quick
 to respond to this request, 15 minutes is not unusual).
 Unacceptable "duration reminder" tones are otherwise generated
 every 5 minutes on the UWATS line that may confuse the modems enough
 to disconnect you at any time.  
