Path: utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!cs.utexas.edu!sun-barr!newstop!sun!imagen!iit!hedley From: hedley@iit (Hedley Rainnie) Newsgroups: comp.sys.atari.st Subject: Re: Redirecting output from serial port to a disk file Summary: to disk not so easy Keywords: f_force, i.o redirection Message-ID: <122@iit.UUCP> Date: 17 Mar 90 02:34:47 GMT References: <6510@sbcs.sunysb.edu> <6664@ncar.ucar.edu> <806@nikhefh.nikhef.nl> Organization: Integrated Information Tech., Santa Clara, CA Lines: 26 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