Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!cs.utexas.edu!uunet!crdgw1!news From: news@crdgw1.crd.ge.com (USENET News System) Newsgroups: comp.sys.ibm.pc Subject: Re: Dos File Access In TSR's Keywords: TSR DOS Message-ID: <961@crdgw1.crd.ge.com> Date: 23 Jun 89 11:27:18 GMT References: <157@wbcs.UUCP> Reply-To: dixon@sagittarius.crd.ge.com (walt dixon) Organization: General Electric Corp. R&D, Schenectady, NY Lines: 30 up articles mentioned checking the INDOS flag. It is true that this flag and the Critical Error flag both must be zero before one can safely do I/O in an asychronous fashion. Be aware that the INDOS flag only protects int 21. Other parts of DOS are not reentrant as well. In particular you don't want to mess with int 25 and int 26 (stack switching) and hard disk access (controller set up). IBMDOS executes int 28h when it is in a keyboard polling loop (caused by int 21h ah <0ch). It is safe to issue another dos request (ah>0ch) from an int 28h isr. The critical section flag will be SET at this time, but it is ok to make the request. From: dixon@sagittarius.crd.ge.com (walt dixon) Path: sagittarius!dixon Before doing any i/o from a TSR you should set up your on critical error/ break handlers, and you must change the PSP (int 21h ah=50h -- undocumented). If you want further info look at Chapter 4 of "The MSDOS Developers Guide, 2nd Ed.", (Sams, 1988). BTW I am the author of that chapter. I get no royalties from sales, etc. I'm just citing a good reference. Walt Dixon {arpa: dixon@crd.ge.com } {us mail: ge crd } { po box 8 } { schenectady, ny 12345 } {phone: 518-387-5798 } -- -- Bruce G. Barnett uunet!steinmetz!barnett