Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!elroy.jpl.nasa.gov!jarthur!ucivax!orion.oac.uci.edu!ucsd!hub.ucsb.edu!rigel!spinrad From: spinrad@rigel.ucsb.edu Newsgroups: comp.os.msdos.programmer Subject: Re: TSR programming with MSC Message-ID: <9042@hub.ucsb.edu> Date: 12 Feb 91 07:25:02 GMT References: <8646@hub.ucsb.edu> <1991Feb3.055420.5504@ys2.uucp> <2853@bimacs.BITNET> Sender: news@hub.ucsb.edu Distribution: comp Lines: 28 Originally I wrote an article which described that I had problems with printf from a TSR written in MSC. I got many responses which said that this was a reentrantcy problem. Believing that I correctly handled the reentrancy issue, I wrote an assembly language routine which invoked int 21 print string. I used this function instead of using MSC's printf in my TSR and everything worked fine. Thus the problem was due to printf and not to reentrancy. One reply I got (sorry I lost this persons name so I can't give him proper credit), suggested that this was due to printf calling malloc and getting assigned "free" space which was outside the TSR space. I belive this reply was correct. So now I have the option of rewriting the library functions which call malloc, or I can just rewrite the malloc routine. I believe the first method would be easier since I don't need to use too many library functions. However, if someone has already rewritten a malloc to work with MSC's TSR, then the latter method would be easier. So if anyone knows of such a malloc routine, I would appreciate learning more about it. Thanks, Sandy -- Sandy Spinrad Internet: spinrad@cornu.ucsb.edu UUNET: uunet!hub.ucsb.edu!spinrad@cornu