Mail Archives: djgpp/1998/03/24/20:55:18
On Mon, 23 Mar 1998, Viktor Lundstrom wrote:
> Something similar happened to me before... I used an inline asm
> function to write to the text-mem (ie. 0xb8000), and the inline asm
> function overwrote a pointer to a struct, resulting in GPFs...
> I replaced the inline asm function with _farpokeb (or whatever - a
> DJGPP function in any case), and it worked. I guess the DJGPP
> function restored all the registers it clobbered, but my inline asm
> function listed all the clobbed registers.
Well, `_farpokeXX' functions are implemented in inline assembly, and
they rely on GCC to reload any registers they clobber. See the header
<sys/farptr.h>. You might compare the code there with your version,
to see what exactly did you do differently. Perhaps there *is* a bug
in GCC, but it is only limited to certain registers and not to all of
them. Or perhaps you used a different constraint letter(s).
- Raw text -