Article View: alt.msdos.programmer
Article #1287Re: idling in the interpreter
From: Stephen Trier
Date: Fri, 02 Mar 1990 02:24
Date: Fri, 02 Mar 1990 02:24
20 lines
1916 bytes
1916 bytes
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
Technical Details
Message-ID:
<1990Mar2.022448.9490@usenet.ins.cwru.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!usenet.ins.cwru.edu!solarium!trierReferences:
<PAS.90Mar1120125@saffron.lcs.mit.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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: <PAS.90Mar1120125@saffron.lcs.mit.edu> Reply-To: trier@SCL.CWRU.Edu (Stephen Trier) Organization: Smith Undergrad Lab, CWRU, Cleve. OH Lines: 20 X-Post-Machine: solarium.scl.cwru.edu