Mail Archives: djgpp/1997/04/17/15:12:27
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 -