next up previous contents index
Next: get_next_selector_increment_value Up: Functions and Procedures Previous: free_ldt_descriptor

segment_to_descriptor

   

Declaration:

Function segment_to_descriptor (seg : Word) : Word;

Description:

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

Parameters:

seg:
the real mode segment you want the descriptor to

Return values: Descriptor to real mode segment address.

Notes: The returned descriptors limit will be set to 64 kB. Multiple calls to this function with the same segment address will return the same selector. Descriptors created by this function can never be modified or freed. Programs which need to examine various real mode addresses using the same selector should use the function allocate_ldt_descriptors() and change the base address as necessary.

Errors:

Check int31error variable.

See also:

allocate_ldt_descriptors, free_ldt_descriptor, set_segment_base_address

For an example, see seg_fillchar.



Michael Van Canneyt
Thu Sep 10 13:59:33 CEST 1998