segment_to_descriptor function
Map segment address to descriptor.
Declaration
function segment_to_descriptor(seg: Word): WordDescription
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.
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.
For an example, see seg_fillchar.
Errors
Check the int31error variable.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
