burkett@csd4.milw.wisc.edu (Edward W Burkett) (12/28/88)
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. (I have a friend that is using an AMIGA and he just laughs) How about it......anyone know a way of doing this? Thanks
cramer@optilink.UUCP (Clayton Cramer) (12/30/88)
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!)
mju@m-net.UUCP (Marc Unangst) (01/01/89)
[ stuff about redirecting serial I/O to disk ] [ stuff about impossibility of above because of the fact that mode programs write directly to the comm port hardware ] 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.) -- "Don't find a fault, | Marc Unangst find a remedy." | UUCP: mju@m-net.ann-arbor.mi.us -Henry Ford | UUCP path: ...!uunet!mailrus!clip!m-net!mju ---------------------+ Internet: mju%m-net%clip@umix.cc.umich.edu
il@csri.toronto.edu (Indra Laksono) (01/06/89)
In article <742@optilink.UUCP> writes: >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? .... >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 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 ........................................... ` |- Indra Laksono ---- ---, University of Toronto, Canada M5S 1A4 `' | ........................................... ------ ---' il@theory.toronto.edu, il@theory.toronto.cdn ,---. | il%theory.toronto.edu@relay.cs.net |---| |- {uunet,watmath}!theory.toronto.edu!il |---| |- ........................................... | | |- ' ; `___,