Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!hellgate.utah.edu!caen!zaphod.mps.ohio-state.edu!rpi!uupsi!sunic!ugle.unit.no!solan1.solan.unit.no!stoeen From: stoeen@solan.unit.no (Asbj|rn St|en) Newsgroups: comp.os.msdos.programmer Subject: Re: TSR PROGRAMMING PROBLEM Message-ID: <1991Jan29.233201.21253@ugle.unit.no> Date: 29 Jan 91 23:32:01 GMT References: <1991Jan26.195955.12946@ugle.unit.no> <1991Jan26.220820.7855@uwasa.fi> <8256@ucdavis.ucdavis.edu> <1991Jan29.173752.10045@bronze.ucs.indiana.edu> Sender: news@ugle.unit.no Reply-To: stoeen@solan.unit.no (Asbj|rn St|en) Organization: Norwegian Institute of Technology Lines: 24 In article <1991Jan29.173752.10045@bronze.ucs.indiana.edu>, yawei@bronze.ucs.indiana.edu (mr. yawei) writes: |> This is called the DOS re-entrancy problem which anyone who is teaching |> you to write TSRs should have told you about. Simply speaking, DOS |> cannot be entered twice. Since the int 16h request most likely comes |> from inside DOS, issuing another DOS call destroys the stack of the |> first call thus causing the system to crash. (Actual situation is more |> complicated since DOS uses several stacks. Try to get some books on this |> subject. Unfortunately, I can't think of any good books on writing |> TSRs. Has anyone seen one?) Maybe I am wrong, but I thought that most basic character device DOS functions *were* reentrant... It is true that more complex functions (file, disk handling) are not reentrant. Certainly, function 05H should be okay to call. Perhaps someone out there knows more about this... ------------------------------------------------- | _ | |Asbjoern Stoeen / \ /___ | |Studpost 188 /___\ // | |7034 Trondheim-NTH / \ / \__ | |Norway / \ | | / ___/ | -------------------------------------------------