Path: utzoo!attcan!uunet!snorkelwacker!ai-lab!mbeck From: mbeck@wheaties.ai.mit.edu (Mark Becker) Newsgroups: comp.sys.ibm.pc.programmer Subject: Turbo C 2.0 stdio re-entrancy Keywords: interrupt driven output Message-ID: <8930@rice-chex.ai.mit.edu> Date: 9 Jun 90 05:41:46 GMT Organization: MIT AI Lab, Cambridge, MA Lines: 28 Hello * I'm trying to do two things at once... keeping a time-of-day clock running in the background and having the same program do some useful work in the foreground. This is all in small model. My first naive try at this crashed out with a Stack Overflow error. My second try had me reading the Waite Group's MS-DOS Developer's Guide (Second edition, the sections on TSR's and DOS internal data structures - InDos and Critical Error flags) and doing some reasonable things associated with interrupt-driven procedures (saving registers, switching PSP's, switching DTA's, establishing a separate stack, etc). Stack Overflow again. I get the impression that trying to use the same stdio routines (printf et al) in background as foreground is getting me in trouble but am unsure of a workaround for this. Pointers would be appreciated. Regards, Mark Becker mbeck@ai.mit.edu