Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!elroy!orion.cf.uci.edu!uci-ics!venera.isi.edu!aero!sm.unisys.com!csun!csuna!abcscnuk From: abcscnuk@csuna.csun.edu (Naoto Kimura) Newsgroups: comp.lang.pascal Subject: Re: DUEL OUTPUT Turbo Pascal Keywords: There may be hope Message-ID: <1737@csuna.csun.edu> Date: 8 Mar 89 16:27:12 GMT References: <1302@hjuxa.UUCP> Reply-To: abcscnuk@csuna.csun.edu (Naoto Kimura (ACM)) Organization: CSU Northridge Lines: 32 In article <1302@hjuxa.UUCP> mal@hjuxa.UUCP (LEACH) writes: ]There may be hope for you. With turbo pascal 4.0 (absent w/ 5.0) is ]an example of a device driver called auxinout.pas. This source file ]sets up a unit that is a device driver for the AUX port. For your ]purposes though, it also shows how TP really does I/O, i.e., what ]really happens when you use REWRITE, WRITELN etc. What you could ]do is modify that program, gutting out all of the specifics for the AUX ]port, and modifying the portions where characters are actually written ]out to streams. This could probably be done fairly painlessly and it ]will allow you to take advantage of all the "smarts :-)" of the write ]command. ] ... (text deleted) ... The example text file driver helped quite a bit in trying to modify some TP 3.0 interrupt driven routines I had for sending stuff through the serial port. If you didn't see the "Logger" unit that I posted a few weeks ago, it implements what the original poster wanted. As far as I have tested, it will not only work with stdin and stdout but will also work if the output is sent through the CRT unit. It will also log what is going through "input." As long as you don't reassign the file variables "input" or "output" everything works fine. If you missed it, I can send you a copy. >Michael A. Leach uucp: {decvax,clyde,rutgers,decuac}!hjuxa!mal //-n-\\ Naoto Kimura _____---=======---_____ (abcscnuk@csuna.csun.edu) ====____\ /.. ..\ /____==== // ---\__O__/--- \\ Enterprise... Surrender or we'll \_\ /_/ send back your *&^$% tribbles !!