Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- CA-Clipper/ExoSpace 1.0g - <b>descriptors</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 Descriptors
------------------------------------------------------------------------------

     A segment descriptor is an 8-byte data structure that contains
     information about a segment.  Your application should not have to
     generate descriptors, and, in general, you do not have access to them.
     You may find it helpful, however, to understand the information within a
     descriptor.  The CPU uses this information to translate logical
     addresses to linear addresses, and, in 16-bit, segmented addressing, to
     keep you from accessing or overwriting memory that belongs to another
     process.

     On 80286 machines, a segment descriptor contains the following
     information about a segment:

     .  Base physical address (24 bits)

        The base address is a 24-bit pointer to the physical location for the
        beginning of the segment.  The CPU adds the offset in a protected-
        mode address to this address to determine the complete physical
        address.

     .  Limit (16 bits)

        The limit is the size of the segment (the size of a segment can as
        large as 64 KB).  The CPU uses the limit to determine the last legal
        offset you can address in a given segment.

     .  Type (4 bits)

        The type describes whether the segment is a code segment (and
        therefore executable) or a data segment (and therefore modifiable).
        It also describes whether a code segment can be read as data as well
        as executed, whether a data segment is read-only or read/write, and
        which direction a data segment expands.

     .  Descriptor privilege level (2 bits)

        There are 4 possible privilege levels.  Zero is the highest level, 3
        the lowest.  The privilege level allows a control program to protect
        the system from user programs.  Except under DPMI,
        CA-Clipper/ExoSpace programs run at level 0.

     .  Its presence or absence in physical memory

        The present bit specifies whether the described segment is actually
        stored in physical memory or not.  When a program attempts to access
        a segment that has been swapped out of memory, the CPU generates a
        fault, which a virtual memory manager can trap.

     In addition to the information about the segment it describes, a
     descriptor has one bit that describes the descriptor itself.  The S bit
     specifies whether the descriptor itself is a segment descriptor or a
     system descriptor, such as a Task State Segment or a system gate.

     On the 80286 chip, the remaining 16 bits are reserved.


Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson