www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/10/05/11:00:58

Date: Sun, 5 Oct 1997 16:55:33 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Nate Eldredge <eldredge AT ap DOT net>
cc: Olivier PERRON <olivier DOT perron AT art DOT alcatel DOT fr>, djgpp AT delorie DOT com
Subject: Re: Borland _psp workaround ?
In-Reply-To: <199710020003.RAA19198@adit.ap.net>
Message-ID: <Pine.SUN.3.91.971005165515.19782G-100000@is>
MIME-Version: 1.0

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.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019