News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

How to read the GDT, LDT, and IDT

Started by allynm, May 20, 2011, 06:35:02 PM

Previous topic - Next topic

allynm

Hello everyone,

I have spent the last couple of days trying to untangle how the GDT, LDT, and IDT work.  I thought it would be helpful to figuring them out if there was some asm code that would allow the fields in these tables to be read and displayed.  Since there is at least one debugger out there (Bochs) that can display this info, it must be possible.   I have searched on the internet and on this forum, but haven't found anything, although there are posts that do discuss these structures.  There seems to be no Windows API that does this job, as far as I can tell.

I was hoping that someone here might be able to share with me a snippet or two that would illustrate how to read these fields, or at least give some guidance on how to do it.  I'm not trying to set or change them, merely to read them.


Regards,

Mark Allyn

dedndave


Tedd

All details are in the Intel Manuals, Volume 3 "System Programming Guide"
And at http://wiki.osdev.org/GDT (and related articles.)

There's no Windows API because they don't want you fiddling with it :P
No snowflake in an avalanche feels responsible.

allynm

Good morning 'Dave and Tedd,

Thank you.  As I mentioned, I don't want to fiddle, just to read the notes.

Regards,
Mark