Mail Archives: djgpp/1996/12/27/12:49:06
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
- Raw text -