Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ukma!rutgers!hjuxa!mal From: mal@hjuxa.UUCP (LEACH) Newsgroups: comp.lang.pascal Subject: Re: DUEL OUTPUT Turbo Pascal Keywords: There may be hope Message-ID: <1302@hjuxa.UUCP> Date: 6 Mar 89 16:21:46 GMT Organization: Digital Equipment Corp, Manalapan NJ Lines: 25 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. What auxinout.pas really shows you is a structure that you get when you open a file, i.e., pointers to putchar routines that will be used with that file. By modifying that putchar routine to do 2 putchars, 1 to (pardon my C) stdio and the other to stdprt. I wish I had thought of this earlier, I once had a simaler problem which I solved by, sortof duplicating sprintf by using, I think, the STR function (the one that returns a string given an integer) Good Luck, -- Michael A. Leach uucp: {decvax,clyde,rutgers,decuac}!hjuxa!mal email: hjuxa!mal@decuac.dec.com OR leach@unxa.dec.com