Mail Archives: djgpp/1995/09/22/09:09:23
larsen AT lal DOT cs DOT utah DOT edu (Steve Larsen) writes:
>: This deserves some elaboration. Loading an invalid value into a segment
>: selector shouldn't cause a GP fault. Attempting to access a segment
>: through a selector which contains an invalid value does cause a fault.
>Yeah, that is what I thought. However, according to the information
>presented at the GPF, it is dying on the instruction that loads the
>segment register. Very strange, I thought.
The 386 generates GPF when trying to load invalid data into segment
registers DS, ES, FS, and GS. If SS is involved, a stack exception
is generated instead.
If you load 0/1/2/3 into a segment regstister other than SS you will
_not_ get an exception. Using the segment register will give you some
exception, possibly GPF.
Morten
- Raw text -