Adds serial port support to the multiplexer library.

It also modifies the HP 2100 and PDP11 multiplexers to add serial support as demonstrations of the capability that, one day, might be extended to all simulators.  I have tested the HP support, but I relied on Holger Veit to test the DEC stuff, so I can't guarantee that it works.  I also relied on Holger to test under Linux, so the same caveat applies.

    The changes needed in the device simulators are relatively small.  For example, if you look at the patches for "hp2100_baci.c", you'll note that most of them are documentation changes.  The only things of note are:

 - an expansion of the TMXR initializer

 - additional code in the "attach" routine to try attaching a serial port
   if attaching a socket fails

 - additional code in the "detach" routine for the same reasons

The HP MPX device (hp2100_mpx.c) needs a tiny bit of additional support from the ATTACH and DETACH commands.  Specifically, SCP was modified to set a flag ("sim_unit_ref") to indicate whether ATTACH MPX or ATTACH MPX0 was done, i.e., to differentiate between a device and a unit attach (recall that SCP treats these as both referring to unit 0).  This is needed because the socket attaches (logically) to the device, whereas a serial port attaches to a line.  Without this flag, the attach routine cannot differentiate between ATTACH MPX and ATTACH MPX0, as the distinction is lost by the time the VM's attach routine is called.  This support isn't needed for the HP MUX device because the socket attaches to a different device than the lines do.

    MPX also requires a bit more work due to the capability to mix serial and Telnet lines on the same multiplexer (BACI is a single-line terminal device).

    The attached PDF contains revisions to the "Writing a Simulator for the SIMH System" publication that documents the additions and changes to the multiplexer library for serial port support.  User documentation for serial port support currently exists only in the initial comments in "sim_tmxr.c"; I will add the appropriate text to the "SIMH User's Guide" if we decide to add this to the release version.
16 files changed