[comp.sys.ibm.pc] Summary of COM: --> DISK

burkett@csd4.milw.wisc.edu (Edward W Burkett) (01/18/89)

I would like to THANK those people who responded to my request for info
dealing with TSR redirection of COM: and LPT: to printers.  Following is
a SUMMARY of what I have learned and personally suggest. 

For your information: LPTX is a program that redirects LPT to Disk
                      Chart Master is a Commercial Graphics package

******************************************************************************

Clayton E. Cramer writes --

> There is a fundamental problem attempting to build something equivalent to
> LPTX for COM ports.  I've never seen a program that didn't use the BIOS
> interrupt for the printer, so a program like LPTX just redirects the 
> printer interrupt, writes the characters to disk, and then sends them
> on to the real printer ISR.

> However, most commercial programs that write to the serial ports write
> directly to the hardware, bypassing the useless DOS interrupt for serial
> I/O, and the nearly useless BIOS interrupt for serial I/O.  Therefore,
> there is no way for most programs access to the serial port to be
> redirected.

******************************************************************************
I would like to know.......Why does everybody bypass the serial 
interrupt? (must be faster but why not standardize the way its done!!!!)
******************************************************************************

Rich McAllister (rfm@sun.com) writes --

> Because the BIOS support for COM files is so awful, everyone goes
> around it.  This means there's no standard place for a re-director
> to be hooked in.  

> The best way to do this, IMHO, would be to acquire/borrow a second PC, hook
> the serial ports together with a null-modem cable, start some standard
> communication program (QMODEM, PC-TALK, PROCOMM, Relay Gold, Crosstalk,
> what-have-you) on the second PC in ASCII capture mode and then run your
> plot... the second PC will then write the stuff to a file.

*******************************************************************************

Les Mikesell writes of a specific fix for Chart Master
          (I tried this and it works)

<I would like to capture this output as a file so that I can use a plotter at 
<a different site.  This necessitates the redirection occuring in the background
<as the graphics program (Chart Master) is running.

> I haven't seen chart master, but in map master (same publisher) there is a
> file that contains a list of output devices, some parameters and the ports
> they can be connected to.  Try looking for a moderately large file with a
> name starting with CON.  It is a text file and you can make the obvious change
> to the COM1 name to allow output to LPT1 instead.  We did this to allow use
> of a plotter on a network, but it should work with LPTX also.

********************************************************************************

Henry Ford writes of a Hardware Fix --

> Well, there's always the hardware hack: If you have two comm ports, you
> can just hook up a null modem cable between COM1: and COM2:.  Now,
> cobble together a TSR that grabs anything coming in COM2: and writes
> it to disk.  Run the TSR, and then run the program that outputs to
> the serial port, and print to COM1:.  (You may have to turn down the
> baud rate so the TSR can catch the data without dropping characters.)

********************************************************************************

Indra Laksono suggests--

> Clayton is right.  I know of no commercial program that writes
> to the COM ports by BIOS or DOS.  They are not interrupt driven!

> There is a neat little solution, if you have two serial ports,
> get a null modem cable (straight through, but pins 2 & 3 crossed).

> Then write an ISR that writes every character arriving at the second
> serial port to disk.  The code will be even simpler than LPTX

********************************************************************************
********************************************************************************

Finally after searching Simtels archives I found the following 3 programs

PRTDSK.ARC

This is an interesting program that runs as a TEMPORARY resident program that
allows redirection of any device to any device.  As Clayton points out, though,
when dealing with COM ports, PRTDSK will only work if the software uses the
serial I/O interrupt. It is a nice LITTLE program, though, and should be a
part of everyones utilities......just in case.

Two other programs I came across that are of interest are

LPT2DSK.ARC
LPTX700.ARC

These are both TSR's that only work for LPT redirection.  They are both more
elaborate than PRTDSK, allowing multiply redirections at the same time.

With a little luck one of the three above programs should work for your 
lpt --> dsk redirection needs.  PRTDSK is the only one that would work with
Chart Master but all have thier good and bad points.

All three of these programs are available by FTP from Simtel ( 26.0.0.74 )
All are found in pd1:<msdos.printer>
*******************************************************************************

I hope this has been useful to someone .......somewhere!!!
Thanks again

burkett@csd4.milw.wisc.edu (Edward W Burkett)