Date: Tue, 4 Apr 2000 14:02:27 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: Mark Geisert cc: djgpp AT delorie DOT com Subject: Re: Is DOS dead? In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 Precedence: bulk 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?