Article View: alt.msdos.programmer
Article #87Re: INDOS-flag
From: Heath Ian Hunnicutt
Date: Wed, 12 Aug 1992 05:22
Date: Wed, 12 Aug 1992 05:22
38 lines
1989 bytes
1989 bytes
d90-fgu@nada.kth.se (Fredrik Gunne) writes: >I'm trying to learn how to make TSRs. One of the biggest problem I have, is >how to use DOS-functions in my TSR (e.i INT 21h). I've learned that because >DOS is not reentrant you cannot call any DOS-function at anytime. >How can I determine if it's safe to call DOS? >One way to (I`ve heard) is to check the INDOS-flag, returned by a >DOS-function (!). But I havent made I work yet. Should I get the pointer for the >flag everytime I wish to check it, or is it sufficient to call the Get INDOS-flag >function once? Are there any other ways to determine what DOS is up to. >The DOS-idle interrupt has appearently something to tell me, but what? DO NOT keep trying to get the pointer. If you do when DOS is INDOS, you may freeze the system. The pointer can be obtained as follows: DOS 2.0 or higher. INT 21h, AH=34h returns: ES:BX -> one-byte INDOS flag Note that InDos may be zero even at times when DOS is not ready to be called. Specifically, when DOS is handling a critical error, InDos may be zero, but DOS is "busy." The critical error flag is: In DOS 2.x: The byte after the InDos byte. In DOS 3+: The byte BEFORE the InDos byte. In COMPAQ DOS 3.0: 1AAh bytes BEFORE InDos. Have fun, (ha ha - right, when it comes to DOS TSRs) Heath P.S. Above info was adopted from Ralf Brown's interrupt list. -- On Saturday, April 18, 1992, this .sig became self-aware.
Technical Details
Message-ID:
<1992Aug12.052236.20652@cco.caltech.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!swrinde!elroy.jpl.nasa.gov!news.claremont.edu!nntp-server.caltech.edu!heathhReferences:
<1992Aug11.210641.24154@kth.se>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!swrinde!elroy.jpl.nasa.gov!news.claremont.edu!nntp-server.caltech.edu!heathh From: heathh@cco.caltech.edu (Heath Ian Hunnicutt) Newsgroups: alt.msdos.programmer Subject: Re: INDOS-flag Keywords: PC, MSDOS, TSR, interrupt, DOS Message-ID: <1992Aug12.052236.20652@cco.caltech.edu> Date: 12 Aug 92 05:22:36 GMT References: <1992Aug11.210641.24154@kth.se> Sender: news@cco.caltech.edu Organization: California Institute of Technology, Pasadena Lines: 38 Nntp-Posting-Host: bartman