Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
The former adds a Segment Descriptor to the GDT and the latter removes one. Let's say I have added a Segment Descriptor to the GDT and I have put its segment selector in the GS. After I remove it from the GDT, I still can use GS. Does anybody have any idea why? When I remove a descriptor from the GDT, I simply put null in all 8 bytes of the descriptor. I can put the code in here if it helps you help me.
Thanks in advance.
On the field with sword and shield amidst the din of dying of men's wails. War is waged and the battle will rage until only the righteous prevails.
Oh I just figured something out. As long as the Segment Selector is in either DS, ES, FS or GS and you have removed the segment descriptor from the GDT, you will still be able to use it but as soon as you put the previous value of either one of those segment selectors into themselves, as in the means of reloading them with their own values, you will get a general protection fault. This is weird isn't it?
pcmattman,
I tried removing the Data Segment Descriptor from the GDT and I could still use DS. I then did the below after having removed the DS from GDT: