Message-Id: Comments: Authenticated sender is From: "Salvador Eduardo Tropea (SET)" Organization: INTI To: hotpulp AT netidea DOT com, djgpp AT delorie DOT com Date: Fri, 27 Dec 1996 14:36:30 +0000 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: Re: segment registers Hi Shawn Betts: > 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? ES is very used in all the libc routines that uses the CPU-string opcodes, so if you destroy ES you'll get a disaster. FS and GS can be mutilated but be aware because the libc can mutilate the resgisters too. > > 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 used to access to all of your C global variables and SS to all your locals because you'll use EBP as base for the locals. SET --------------- 0 -------------------------------- Salvador Eduardo Tropea (SET). Address: Curapaligue 2124, Caseros, 3 de Febrero Buenos Aires, (1678), ARGENTINA TE: +(541) 759 0013