Message-Id: <199612280023.BAA18062@math.amu.edu.pl> Comments: Authenticated sender is From: "Mark Habersack" Organization: Home, sweet home (Poznan, Poland) To: "Salvador Eduardo Tropea (SET)" , hotpulp AT netidea DOT com Date: Sat, 28 Dec 1996 01:22:56 +0100 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT 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.