DOS/32 Advanced DOS Extender - Programmer's Reference

2.03 - DPMI function 0002h Segment to Descriptor

Maps a real mode segment (paragraph) address onto a descriptor that can be used by a protected mode program to access the same memory.


In: AX = 0002h
BX = real mode segment address

if successful:
CF clear
AX = selector for real mode segment

if failed:
CF set
AX = error code

8011h - descriptor unavailable


a) The descriptor's limit will be set to 64 KB.

b) Multiple calls to this function with the same segment address will return the same selector.

c) The intent of this function is to provide clients with easy access to commonly used real mode segments such as the BIOS data area at segment 0040h and the video refresh buffers at segments 0A000h, 0B000h, and 0B800h. Clients should not call this function to obtain descriptors to private data areas.

d) Descriptors created by this function can never be modified or freed. For this reason, the function should be used sparingly. Clients which need to examine various real mode addresses using the same selector should allocate a descriptor with DPMI function 0000h and change the base address in the descriptor as necessary, using the Set Segment Base Address function DPMI function 0007h.

e) DOS/32 Advanced DPMI will automatically allocate data selector 0040h to map the BIOS data area at segment 0040h.


Copyright Supernar Systems, Ltd. 1996-2005
All Rights Reserved.