en:docs:dpmi:api:int31:00:00

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
en:docs:dpmi:api:int31:00:00 [2021/08/26 06:02] prokusheven:docs:dpmi:api:int31:00:00 [2021/08/27 01:23] (current) – created prokushev
Line 1: Line 1:
 {{page>en:templates:dpmi}} {{page>en:templates:dpmi}}
  
-====== Int 31H, AH=00H, AL=01H ======+====== Int 31H, AH=00H, AL=00H ======
  
 ===== Version ===== ===== Version =====
Line 9: Line 9:
 ===== Brief ===== ===== Brief =====
  
- Frees an LDT descriptor.+Allocate LDT Descriptors
  
 ===== Input ===== ===== Input =====
  
-   AX = 0001H +  AX = 0000H 
-   BX selector for the descriptor to free+  CX number of descriptors to allocate
  
 ===== Return ===== ===== Return =====
Line 20: Line 20:
   if function successful   if function successful
   Carry flag = clear   Carry flag = clear
 +  AX = base selector
      
   if function unsuccessful   if function unsuccessful
   Carry flag = set   Carry flag = set
   AX = error code   AX = error code
-  8022H invalid selector+  8011H descriptor unavailable
      
 ===== Notes ===== ===== Notes =====
  
-Each descriptor allocated with Int 31H Function 0000H must be freed individually with this function, even if it was previously allocated as part of a contiguous array of descriptors.+Allocates one or more descriptors in the task's Local Descriptor Table (LDT). The descriptor(s) allocated must be initialized by the application with other function calls.
  
-Under DPMI 1.0 hostsany segment registers which contain the selector being freed are zeroed by this function.+If more than one descriptor was requested, the function returns a base selector referencing the first of a contiguous array of descriptors. The selector values for subsequent descriptors in the array can be calculated by adding the value returned by Int 31H Function 0003H. 
 + 
 +The allocated descriptor(s) will be set to "data" with the present bit set and a base and limit of zero. The privilege level of the descriptor(s) will match the application's code segment privilege level.
  
 Refer to the rules for descriptor usage in Appendix D. Refer to the rules for descriptor usage in Appendix D.