Article View: alt.msdos.programmer
Article #1294Re: idling in the interpreter
From: Thomas Webb
Date: Fri, 02 Mar 1990 22:06
Date: Fri, 02 Mar 1990 22:06
37 lines
2627 bytes
2627 bytes
In article <25EDB1B8.4B34@deimos.cis.ksu.edu> mac@harris.cis.ksu.edu (Myron A. Calhoun) writes:
>In article <PAS.90Mar1120125@saffron.lcs.mit.edu> pas@lcs.mit.edu (Paul A. Selkirk) writes:
>>Does anyone know of a bulletproof way for a TSR to tell whether DOS (assume
>>2.x or 3.x) is idling in the command interpreter, or executing a program?
>
> "DOS keeps a one-byte flag, which is usually called the InDOS flag
> or the DOS Active byte. The value of this flag at any instant
> equals the number of calls to INT 21h functions which are currently
> in process of execution. In particular, if the value is zero no
> DOS function is presently active and so DOS functions can be safely
> called. Finding the value of the InDOS Flag is easy: a call to
> function 34h of INT 21h returns the address of the flag in es:bx."
>
[lots of interesting stuff deleted]
The Waite Group's MS-DOS Developer's Guide, second edition, goes into
the area of using the above function and int 28h. Neither of these
functions is documented, so you pay your money and take your risks...
Anyway, according to the Waite Group there are 'some peculiarities
regarding the DOS busy flag in various versions of MS-DOS. Under
MS-DOS 2.10, the byte immediately after the DOS busy flag must be set
to 00 to permit the PRINT.COM interrupt to be called. For MS-DOS 3.0
and 3.1 (except COMPAQ DOS 3.0), the byte before the DOS busy flag
must be zero; for COMPAQ DOS 3.0 the byte 01AAh before it must be
zero.' (pp744-745). Any typos in the above are probably mine, also,
I should note that I haven't actually tried to use the features
described here, but I have found the MS-DOS Developer's guide to be
quite reliable... Hope this isn't too misleading,
-tom
--
===============================================================================
webb@uhccux.uhcc.Hawaii.edu "The first duty in life is to assume a pose.
What the second is, no one has yet
discovered." -Oscar Wilde
Technical Details
Message-ID:
<6811@uhccux.uhcc.hawaii.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!noao!asuvax!cs.utexas.edu!uwm.edu!bionet!ames!uhccux!webbReferences:
<PAS.90Mar1120125@saffron.lcs.mit.edu> <25EDB1B8.4B34@deimos.cis.ksu.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!noao!asuvax!cs.utexas.edu!uwm.edu!bionet!ames!uhccux!webb From: webb@uhccux.uhcc.hawaii.edu (Thomas Webb) Newsgroups: alt.msdos.programmer,comp.sys.ibm.pc.programmer Subject: Re: idling in the interpreter Summary: Not documented, and said to be tricky Message-ID: <6811@uhccux.uhcc.hawaii.edu> Date: 2 Mar 90 22:06:41 GMT References: <PAS.90Mar1120125@saffron.lcs.mit.edu> <25EDB1B8.4B34@deimos.cis.ksu.edu> Reply-To: webb@uhccux.UUCP (Thomas Webb) Distribution: usa Organization: University of Hawaii Lines: 37