Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!cs.utexas.edu!uunet!mcvax!kth!draken!tut!santra!saha.hut.fi!c37189h From: c37189h@saha.hut.fi Newsgroups: comp.sys.ibm.pc Subject: DOS "Critical Section Flag" Message-ID: <23020@santra.UUCP> Date: 21 Jun 89 16:01:37 GMT Sender: news@santra.UUCP Reply-To: c37189h@saha.hut.fi () Lines: 16 Someone wanted to know when it is safe to access dos. (I think it was in this newsgroup) So, here comes one way to ditect safety: DOS Int 21h with AH=34h returns a pointer to "Critical Section Flag" in ES:BX. Byte pointed by the pointer is zero in case it is safe to access DOS. Also the critical error flag should be zero as long as it is safe. The Critical error flag is the byte AFTER the critical section flag in DOS 2.x and the byte BEFORE the critical section flag in DOS 3.x (exept COMPAQ DOS 3.0 where it is located 1AAh bytes before the critical section flag). Sorry, I don't know about DOS 4.x :-( This seems quite a complex way of detecting safety to me! I wonder if anyone knows a better way to do it. (In case anyone does please, e-mail to me!) --- E-mail: c37189h@saha.hut.fi * If you're feeling good, don't UUCP: ...!mcvax!santra!saha!c37189h * worry - You'll get over it! :)<-<