Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!bellcore!texbell!merch!cpe!hal6000!trsvax!don From: don@trsvax.UUCP Newsgroups: comp.sys.ibm.pc Subject: Re: Help from TSR Gurus requested Message-ID: <216100111@trsvax> Date: 20 Jul 89 13:55:00 GMT References: <536@cybaswan.UUCP> Lines: 32 Nf-ID: #R:cybaswan.UUCP:536:trsvax:216100111:000:1548 Nf-From: trsvax.UUCP!don Jul 20 08:55:00 1989 >>Now the Question: Can the resident part of a TSR get away with using the area >>below 5Ch? I would *think* that DOS has no further use for the PSP after the >>program becomes resident, but of course the area may still figure >>in some sort of linked-list internally in DOS. >Once you hooked up your TSR routine to any interrupt handler, the PSP is not >used anymore. This is not in general correct. It may be correct for some TSR's, but if a TSR performs any interrupt 21h functions (after checking for re-entrancy, of course), some values in the current PSP are altered, so you need to set up your PSP as the current PSP before performing such operations. The same goes for disk I/O. At any rate, a TSR's PSP may be used after the program has gone resident, so you need to make sure it isn't used before you re-use it. BTW, sometimes I move the stack pointer to 100h in a com file so the stack grows over the PSP. If I need more stack, I can make my first statement as a jump, then allocate a data buffer immediately after that point, setting up the stack to point at the end of my new buffer. I assume by the time the stack has grown over my first statement, I've already executed it. --------------------------------------------------------------------- I purchase Product 19 because it's the only cereal I know named after a prime number. - paraphrased from a posting in rec.humor.funny Don Subt The opinions expressed above are Tandy Corp. strictly mine, not my employer's. 817-390-3068 ...!killer!ninja!sys1!trsvax!don