Virtual Devices (3.1) (vdag31qh.hlp) (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
_BuildDescriptorDWORDs
                                                     Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
include vmm.inc
 
VMMcall _BuildDescriptorDWORDs, <DESCBase, DESCLimit, DESCType,
                                 DESCSize, flags>
 
mov     [DescDWORD1], edx       ; high doubleword of descriptor
mov     [DescDWORD2], eax       ; low doubleword of descriptor
 
The _BuildDescriptorDWORDs service builds the descriptor parameter used in
calls to the _Allocate_GDT_Selector and _Allocate_LDT_Selector services.
 
Parameter  Description
────────────────────────────────────────────────────────────────────────────
 
DESCBase   Specifies the 32-bit base address for the descriptor.
 
DESCLimit  Specifies the 20-bit limit for the descriptor.
 
DESCType   Specifies the present bit, DPL, and type fields for the
           descriptor (bits 8-15 of the high doubleword). Only the low 8
           bits of the parameter are valid; all other bits must be zero.
 
DESCSize   Specifies the granularity and big/default fields for the
           descriptor (bits 20-23 of the high doubleword). Only bits the
           high four bits (4-7) of the DESCSize parameter are valid; all
           other bits must be zero.
 
flags      Specifies the operation flags. This parameter can be the
           following value:
 
           Value           Meaning
           ─────────────────────────────────────────────────────────────────
           BDDExplicitDPL  Uses the DPL bits in the DESCType parameters. If
                           this value is not given, the service sets the DPL
                           bits to be equal to the RPL bits for
                           protected-mode applications.
 
           All other values are reserved.
 
Return Value
 
The EAX register contains the low doubleword of the descriptor and the EDX
register contains the high doubleword of the descriptor.
 
Comments
 
Virtual devices must not rely on the privilege level at which protected-mode
applications run. When creating selectors for protected-mode applications, a
virtual device should specify the BDDExplicitDPL value. This provides a
convenient way to build descriptors without knowing the protection level for
protected-mode applications.
 
Uses
 
EAX, EDX
 
See Also
 
_Allocate_GDT_Selector, _Allocate_LDT_Selector