Date: Sun, 5 Oct 1997 16:55:33 +0200 (IST) From: Eli Zaretskii To: Nate Eldredge cc: Olivier PERRON , djgpp AT delorie DOT com Subject: Re: Borland _psp workaround ? In-Reply-To: <199710020003.RAA19198@adit.ap.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk On Wed, 1 Oct 1997, Nate Eldredge wrote: > >i'm porting a Borland program to DJGPP and can't figure out how to > >workaround the Borland _psp global variable. > The _psp variable is the segment of your PSP, right? DJGPP stores this in > _go32_info_block.linear_address_of_original_psp. I suggest to use function 62h of the DOS interrupt 21h (it returns in the BX register the same value that you get in `_psp' under Borland), instead of using linear_address_of_original_psp. The reason for this recommendation is that when a DJGPP program runs under a debugger, it gets a copy of the real PSP, and so using the linear address provided in `_go32_info_block' could yield stale values (depending on what parts of the PSP do you need to access). Using the DOS interrupt gets you consistent results both stand-alone and under a debugger.