Path: utzoo!mnetor!tmsoft!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!mit-eddie!uw-beaver!cornell!rochester!pt.cs.cmu.edu!b.gp.cs.cmu.edu!ralf From: ralf@b.gp.cs.cmu.edu (Ralf Brown) Newsgroups: comp.os.msdos.programmer Subject: Re: Word for Windows and DOS idle interrupt (INT28) Message-ID: <11414@pt.cs.cmu.edu> Date: 15 Dec 90 22:32:30 GMT References: <1522@netmbx.UUCP> <1990Dec13.220804.1611@vax5.cit.cornell.edu> <5094@trantor.harris-atd.com> Distribution: comp Organization: Carnegie-Mellon University, CS/RI Lines: 26 In article <5094@trantor.harris-atd.com> sonny@trantor.harris-atd.com (Bob Davis) writes: } From my reading on the subject, I have concluded that DOS can }safely be re-entered with ANY Int21h DOS function if the InDOS flag indicates }DOS not busy. If you know this not to be universally true, please tell me. } Also, I have concluded that, even though InDOS flag might indicate }DOS busy, if Int28h (DOS idle interrupt) occurs, I can safely call Int21h }functions above 09h. If you know of exceptions to this, please tell me. First, it is functions above 0Ch that may safely be called during an INT 28. Functions 01h to 0Ch use one stack, 00h and 0Dh up use a second stack, and a third stack is used during a critical error (INT 24). There is one additional case: functions 3Fh and 40h given a handle referring to CON must be treated as though they were one of the functions from 01h to 0Ch. It is not necessarily safe to reenter DOS when InDOS is zero, because InDOS is set to zero during a critical error interrupt (at which time the critical error flag is nonzero). The DOS function dispatcher initially switches to the stack used by during critical errors before determining which of the other two stacks to use if the call was not from an INT 24 handler; thus, you can't reenter DOS from other than the INT 24 handler while the critical error flag is set. -- {backbone}!cs.cmu.edu!ralf ARPA: RALF@CS.CMU.EDU FIDO: Ralf Brown 1:129/3.1 BITnet: RALF%CS.CMU.EDU@CMUCCVMA AT&Tnet: (412)268-3053 (school) FAX: ask DISCLAIMER? Did | Everything is funny as long as it is happening to I claim something?| someone else. --Will Rogers