Xref: utzoo alt.msdos.programmer:1319 comp.sys.ibm.pc.programmer:192 Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!usenet.ins.cwru.edu!solarium!trier From: trier@solarium.scl.cwru.edu (Stephen Trier) Newsgroups: alt.msdos.programmer,comp.sys.ibm.pc.programmer Subject: Re: idling in the interpreter Summary: Use int 28h and/or the flag found with int 21h, function 34h Message-ID: <1990Mar2.022448.9490@usenet.ins.cwru.edu> Date: 2 Mar 90 02:24:48 GMT References: Reply-To: trier@SCL.CWRU.Edu (Stephen Trier) Organization: Smith Undergrad Lab, CWRU, Cleve. OH Lines: 20 X-Post-Machine: solarium.scl.cwru.edu There are two ways to find out, and you really need to do both. The first way, which is the most reliable, is to hook into interrupt 28h, sometimes known as the "DOS-Idle" interrupt. MS-DOS calls this whenever it is waiting for some event, like a keystroke. *Almost* all the MS-DOS functions are safe to use at this point. (I'm not sure which ones aren't.) This interrupt is used by the print.com print spooler. I also used it for my Printscreen TSR I'm working on; it buffers the screen in memory until DOS-Idle tells it that it's safe to write to the disk. Be sure to pass on the interrupt by calling whoever had to vector before you, or else a lot of other TSR's will die when yours is installed. The other flag to check is the "DOS-Busy" flag. You can find out its location by calling int 21h, function 34h. The flag address will be returned in the ES:BX pair. This flag is 1 if MS-DOS is active, and 0 if it isn't. Watch out though, since according to the flag, MS-DOS is active when it's at the command prompt! That's why you may need to use both techniques. <=> Stephen Trier sct%seldon@skybridge.SCL.CWRU.Edu {sun,att,decvax}!cwjcc!skybridge!seldon!sct sct@po.CWRU.Edu