Mail Archives: djgpp/1994/01/17/18:20:45
> If I link with this modified version of gcrt0.o I get a General Protection
> Fault (unsupported INT 0x0d) from the instruction
>
> movw %ds,%cs:__ds_sav
>
> during initialization. I don't know much about protected mode, but I
> could imagine that the code segment is read-only. If that's the case,
> where else could I store the value of DS to make it available to the
> interrupt? Or, if the code segment is not read-only, what else is causing
> the general protection fault?
The code segment *is* read-only. Since you're saving %ds, assume that it
has the current data segment in it, and skip the %cs override:
movw %ds, __ds_sav
- Raw text -