Thread View: alt.msdos.programmer
2 messages
2 total messages
Started by Fredrik Gunne
Tue, 11 Aug 1992 21:06
INDOS-flag
Author: Fredrik Gunne
Date: Tue, 11 Aug 1992 21:06
Date: Tue, 11 Aug 1992 21:06
13 lines
1098 bytes
1098 bytes
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? Bye! Fredrik Gunne
Re: INDOS-flag
Author: 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.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads