delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/04/17/15:12:27

Message-Id: <m0wHqMb-000S1pC@natacha.inti.edu.ar>
Comments: Authenticated sender is <salvador AT natacha DOT inti DOT edu DOT ar>
From: "Salvador Eduardo Tropea (SET)" <salvador AT inti DOT edu DOT ar>
Organization: INTI
To: Brad Fidler <BF AT rwdi DOT com>, djgpp AT delorie DOT com
Date: Thu, 17 Apr 1997 15:48:46 +0000
MIME-Version: 1.0
Subject: Re: Available Selectors

Brad  Fidler <BF AT rwdi DOT com> wrote:
> If I want to load a custom selector (using NASM)
> which registers are free for use?
No one, all ....

> Do interupts or other C functions that I may call
> assume certain registers to be loaded with a
> specific selector, therefore they are off limits.
You must restore have DS, SS and ES before calling any libc function, these 
functions assumes that this registers have the rigth value. 
Don't modify ES and then call a function from string.h!!!!, restore the value 
before calling!
Be carefull while using FS and GS some libc functions can clobber the values.
So you can use FS and GS but you must reload the values after calling a libc 
funtion (or any other library) or check the code to be sure that this value 
will be preserved.

SET 
------------------------------------ 0 --------------------------------
Visit my home page: http://www.geocities.com/SiliconValley/Vista/6552
Salvador Eduardo Tropea (SET). (Electronics Engineer)
Address: Curapaligue 2124, Caseros, 3 de Febrero
Buenos Aires, (1678), ARGENTINA
TE: +(541) 759 0013

- Raw text -


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