Path: utzoo!utgpu!attcan!uunet!lll-winken!tekbspa!optilink!cramer From: cramer@optilink.UUCP (Clayton Cramer) Newsgroups: comp.sys.ibm.pc Subject: Re: Com: --> Disk Message-ID: <742@optilink.UUCP> Date: 29 Dec 88 18:15:28 GMT References: <126@csd4.milw.wisc.edu> Distribution: na Organization: Optilink Corporation, Petaluma, CA Lines: 42 In article <126@csd4.milw.wisc.edu>, burkett@csd4.milw.wisc.edu (Edward W Burkett) writes: > > I recently picked up a copy of a program called LPTx which is a TSR > package that redirects output from 3 printer ports to 3 files. It is > a great program and is available from Simtel. > > What I want to know is ---- Can the same thing be done with a serial port? > > This question has been asked several times in the past and it just seems to > disappear......As far as I can tell the only way to redirect output from a COM > port to a disk is by using the copy command [copy com1 filename] but this > is really not very helpful. The mode command sure doesn't seem to work! > > I have a graphics package that is outputing HPGL through the COM ports and > 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. > > How about it......anyone know a way of doing this? 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. Redirecting the BIOS interrupt for serial I/O is not a hopeless task -- the sources for LPTX are supposed to be distributed with the .EXE -- so you might be able to use that as an example of how to do it -- but this is likely to be useful in only a few cases. -- Clayton E. Cramer {pyramid,pixar,tekbspa}!optilink!cramer (Note new path!)