[comp.sys.atari.st] Redirecting output from serial port to a disk file

bovet@hao.hao.ucar.edu (Ray Bovet) (03/16/90)

In article <6510@sbcs.sunysb.edu> mrose@libserv1.ic.sunysb.edu (Michael Rose) writes:
>Hello Everyone!
>
>I am still trying to find a program to redirect output from the serial port
>to a disk file (to save postscript output from TimeWorks Desktop Publisher
>to disk).  If anyone knows of such a program please send me the file as
>soon as possible.  In the meantime my friend is currently working on a
...
Moshe Braner wrote a very similar program called Barrel some time ago to
capture output destined for the printer (thank you Moshe!).  I found it
relatively easy to use his techniques to capture output destined for a
printer on the parallel port, translate escape sequences intended for a
daisywheel printer into the appropriate codes for my HP Deskjet, and send
them back out to the serial port.  It would be very easy to convert his
original program to capture serial output to disk.  I would expect that
Barrel would be available on a number of archive sites.  If not I suppose
I could repost it here.

				Ray

t19@nikhefh.nikhef.nl (Geert J v Oldenborgh) (03/16/90)

In article <6664@ncar.ucar.edu> bovet@hao.hao.ucar.edu (Ray Bovet) writes:
>Moshe Braner wrote a very similar program called Barrel some time ago to
>capture output destined for the printer (thank you Moshe!).  I found it

Except that barrel only holds 120K worth of stuff at the most.  That is 
exactly half a TeX page in Epson codes.  Dunno how big you PS is...

hedley@iit (Hedley Rainnie) (03/17/90)

I tried hacking a trap catcher that would catch the output from Timeworks
going to the serial port (i.e. Lazywriter), and send this to disk. I got
a lot of bombs, sometimes it worked. Basically what you want to do is catch
the serial output and input (Lazywriter backchannel info although discarded
by TWDTP, is still read), and perform an Fwrite call, I seemed to run into
a re-entrancy problem here, you are now one call in the rom via the serial
out and you attempt another call this time to the file system.... This all
may have been poor coding on my part I was under pressure because UltraScript
(the Atari release anyway...) was going out bundled with TWDTP and we had no 
way to print from it! Anyway, finally after numerous proddings to the UK 
they (TWDTP) wrote a new .sys file, much better than a crude port catcher
since they had the ability to do it cleanly, and I had serious doubts about
getting my catcher working bug free. I know that one method is to use RAM
and save during a non-critical time but that is a mess too. There must be
a way to hack the stack so when you get back to user mode instead of being
in TWDTP you are in a small hack routine and then ultimately you return to
TWDTP.....


Hedley


-- 
{decwrl|sun}!imagen!iit!hedley	| Integrated Information Tech.
hedley@imagen.com		| Santa Clara, CA. (408)-727-1885 x49