LDT... What and Why?

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.
Post Reply
DarkTama

LDT... What and Why?

Post by DarkTama »

I was just wondering how exactly you use an LDT.
I know that you define it the same way as a GDT.
Use LLDT to load it. But how do we access the
entries in it?

With a GDT we use something like
mov ax,SELECTOR_EQUATE
mov segmentregister,ax

But how do I do it with an LDT?
Philippo

RE:LDT... What and Why?

Post by Philippo »

>With a GDT we use something like
>mov ax,SELECTOR_EQUATE
>mov segmentregister,ax
>
>But how do I do it with an LDT?

just the same way, but the selector must have bit 2 set to 1.

this is the description of segment selectors:
bit 0-1 requested previlege level
bit 2 table indicator (0=gdt, 1=ldt)
bit 3-15 index into descriptor table

e.g.
0000000000001000b (=0x08) second gdt entry
0000000000001100b (=0x0C) second ldt entry

hope this helps

bye

Philippo
Post Reply