delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/04/07/12:30:09

Date: Tue, 4 Apr 2000 14:02:27 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Mark Geisert <admin AT xenon DOT gem DOT net>
cc: djgpp AT delorie DOT com
Subject: Re: Is DOS dead?
In-Reply-To: <Pine.BSD/.3.91.1000403180956.7718A-100000@xenon.gem.net>
Message-ID: <Pine.SUN.3.91.1000404140207.9459K-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Mon, 3 Apr 2000, Mark Geisert wrote:

> When NT creates a new process, the process' FS register contains a selector 
> that can be used to address the TEB, Thread Environment Block.  There is a
> way to use this to get the Windows version.  This is how GetVersion() works, 
> BTW, it's not a wrapper on a syscall but a bunch of load-relatives from FS.
> 
> Is the FS register available with it's original contents to DJGPP-built 
> programs running from a Command Prompt window?

FS is used for the interface between the stub loader and the COFF
executable.  So, if we are to use this, stub.asm will need to be
changed to save away the contents of FS somewhere where it could be
accessed from the main program.

Assuming that this special selector is known, how would one go about
using it to access the Windows version?

- Raw text -


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