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?
LDT... What and Why?
RE:LDT... What and Why?
>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
>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