Allocate LDT Descriptors
This function is used to allocate one or more
descriptors from the task's Local Descriptor Table
(LDT). The descriptor(s) allocated must be initialized
by the application.
To Call
AX = 0000h
CX = Number of descriptors to allocate
Returns
If function was successful:
Carry flag is clear.
AX = Base selector
If function was not successful:
Carry flag is set.
Programmer's Notes
o If more than one descriptor was requested, AX will
contain the first of a contiguous array of
descriptors. You should add the value returned by
function 0003h (see function 0008H) to get to the
next selector in the array.
o The descriptor will be set to present data type,
with a base and limit of zero.
o It is up to the caller to fill in the descriptors.
o The privilege level of descriptors will match the
application's code segment privilege level. When
modifying descriptors, always set the DPL to the
same privilege ring as your program's code
segment. Use the lar instruction to determine the
privilege of a descriptor.