A These notes should be considered an addition to the documentation B to be found in PSEUDO.DOC.  These notes document some enhancements@ I have made to the drivers as well as some caveats I have found.  C First of all, I want to grant credit to the original authors of the E driver, they are listed at the beginning of the two source files.  In K private correspondence with Dale Moore at CMU, he has chosen to release the J driver to the public domain.  There have been various incarnations of thisF driver in the past.  I started with a version that was modified to runJ under VMS V4 and cleaned it up and made CONNECT/DISCONNECT and HANGUP workI consistently.  I also changed the device name of the terminal device from 9 PTAn: to TPAn: because VMS now uses PTA0: for MSCP tapes.   6 The drivers have been tested on VMS V4.0 through V4.4.  @ Load the two drivers as PYA0: and TPA0:.  Assigning a channel toD PYA0: will create a PYAn: and a TPAn: pseudo-terminal pair (the unitG numbers just go up).  Anything you write to that channel appears on the L TP as if typed at a terminal.  Any output to the terminal TPAn: is availableJ to be read from PYAn:.  On output, the devices do flow control between oneF another and all buffering.  You can just read, for example, with a 100F char buffer from PY and the read will complete with whatever number ofE characters the QIO to the TP terminal had, anywhere from 1 to MAXBUF. E If the QIO to the TP had more chars than your read buffer, it'll just E fill the read buffer and return, and you can get the rest on the next C read.  On input, it is possible to overrun the TP device's terminal 1 type-ahead buffer, as it is with a real terminal.   B If you assign a mailbox with the PYAn: device (use LIB$ASN_WTH_MBXC when assigning the channel to PYA0:) you will get an MSG$_TRMHANGUP E message in the mailbox whenever the terminal is hung-up.  This occurs I when a process deassigns the last channel to the device, just as a HANGUP K will on terminals with modem signals.  You may ignore the hangup message if < you choose and continue to use the device after the message.  F Should you deassign all channels to the PYAn: device, a hangup will beL forced on any process using the TPAn: device.  Just like dropping carrier onI a modem line.  If the pseudo-terminal is in use by an interactive process I and has an associated virtual terminal, the process will be disconnected, 5 otherwise the interactive process will be logged out.   B To enable virtual terminals on pseudo-terminals, you must have theG TT2$M_DISCONNECT bit set in the system default terminal characteristics  (TTY_DEFCHAR2 in SYSGEN).   A Note that, just as with normal VMS terminals, you will only get a C VTAn: if the line has the DISCONNECT terminal characteristic before C you log into it, and only if you use LOGINOUT to start a process on B the terminal.  Sending a <CR> into the pseudo-terminal device will1 start up LOGINOUT as it would on a real terminal.   G There is currently one minor known bug in the drivers, a side-effect of H the driver being cautious in order to prevent possible problems.  If youD have a virtual terminal associated with the pseudo-terminal, and youF deassign the last channel to the control device (the PY device) then aH DISCONNECT is forced on any process on the TP and both devices should beF deleted.  Currently, the TP will not disappear, though the PY will andF the TP will be marked as OFFLINE.  This is because I rely on VMS to doE the actual delete of the device and it appears that virtual terminals J screw up the way device reference counts work, so VMS never gets around toI deleting the device.  It is marked for delete, so anything you do (I like L SHOW TERM TPA53:, for example) will cause it to disappear.  I could fix thisH by zapping the device explicitly after forcing the DISCONNECT, however IL am not convinced that someone, somewhere, won't try to reference the UCB andK thus cause bad things to occur.  Note that it DOES get deleted correctly if K you do not have a virtual terminal associated with the TP or if you have no K processes active on the TP when the PY and TP are to be deleted.  These two  cases are generally the norm.   . I am currently considering a few enhancements:  H  o  It should be possible to set the TP terminal characteristics through=     the PY device, so the controlling program can set them.     G  o  The TP device driver should notify the controlling program (via the D     associated mailbox) whenever the TP terminal characteristics are:     changed in case applications need to know such things.  H  o  There should be a mechanism, again utilizing the associated mailbox,J     for the controlling application to be notified when the TP's typeahead     buffer fills.   M I need to think about the ramifications of changing device characteristics on ? TTDRIVER unexpectedly, however, before I make the first change.   D If you need to set characteristics of the terminal device right now,@ you must assign a channel to the TP device and use a SETMODE QIOF then deassign the channel before giving the TP to another process. You< will get a HANGUP message in the associated mailbox when you@ deassign if the HANGUP attribute was set on the device.  You can> ignore this message, however, and go ahead and use the device.  E You cannot set characteristics of the master device.  This used to be @ allowed, though it had no purpose, and it crashes the system (at least under V4).  @ 	/Kevin Carosso               kvc%engvax.UUCP@usc-oberon.usc.edu 	 Hughes Aircraft Co.    	 December 9, 1986