www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/12/27/19:43:48

Message-Id: <199612280023.BAA18062@math.amu.edu.pl>
Comments: Authenticated sender is <grendel AT ananke DOT amu DOT edu DOT pl>
From: "Mark Habersack" <grendel AT ananke DOT amu DOT edu DOT pl>
Organization: Home, sweet home (Poznan, Poland)
To: "Salvador Eduardo Tropea (SET)" <salvador AT natacha DOT inti DOT edu DOT ar>,
hotpulp AT netidea DOT com
Date: Sat, 28 Dec 1996 01:22:56 +0100
MIME-Version: 1.0
Subject: Re: segment registers
Reply-to: grendel AT ananke DOT amu DOT edu DOT pl
CC: djgpp AT delorie DOT com

Once upon a time (on 27 Dec 96 at 14:36) Salvador Eduardo Tropea 
(SET) said:

> > When I do an asm statement, does djgpp care if I change ES, FS, or
> > GS? can I mutilate them all I want without the worry that djgpp
> > will crash?
As long as you save them and restore when done, it's OK to mess up 
with them.
FS is being used whenever you take advantage of any far* functions 
(the ones used to emulate FAR pointers with DJGPP).
Also you have to remember that segment registers in PM contain 
SELECTORS (which are offsets to LDT or GDT) and NOT real segment 
offsets as in RM.

> > also, does DS ALWAYS hold the data selector for all my variables I
> > ever declare in a program? Or does it just hold the global
> > variable selector?
>   You are in a flat memory model DS=CS=ES(=SS? I guess), so DS is
CS is not always equal to the rest, but the others are the same most 
of the time.



- Raw text -


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