Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Peter Norton Programmer's Guide - Norton Guide http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]

  The 80286 also uses segmented addresses, but when the 80286 runs in
  protected mode, the addresses are decoded differently than on an 8086 or
  in 80286 real mode. The 80286 decodes protected-mode segmented addresses
  through a table of segment descriptors. The "segment" part of a segmented
  address is not a paragraph value, but a "selector" that represents an
  index into a segment descriptor table (Figure 2-4). Each descriptor in
  the table contains a 24-bit base address that indicates the actual start
  of a segment in memory. The resulting address is the sum of the 24-bit
  base address and the 16-bit offset specified in the segmented address.
  Thus, in protected mode the 80286 can access up to 224 bytes of memory;
  that is, physical addresses are 24 bits in size.

  This table-driven addressing scheme gives the 80286 a great deal of
  control over memory usage. In addition to a 24-bit base address, each
  segment descriptor specifies a segment's attributes (executable code,
  program data, read-only, and so on), as well as a privilege level that
  lets an operating system restrict access to the segment. This ability to
  specify segment attributes and access privileges is of great use to a
  multitasking operating system like OS/2.

  The 80386 supports both 8086 and 80286 protected-mode addressing. The
  80386 enhances the protected-mode addressing scheme by allowing 32-bit
  segment base addresses and 32-bit offsets. Thus a single segmented
  address, consisting of a 16-bit selector and a 32-bit offset, can specify
  any of 232 different physical addresses.

                         0038:4321
                           |    |
    |            |         |    |
    |------------|         |    |
    |            | 28      |    |
    |------------|         |    |
    |            | 30      |    |
    |------------|         |    |
  +-|   012340   | 38 .----+    |
  | |------------|              |
  | |            | 40           |
  | |------------|              |
  | |            |              |
  |                             |
  +------------------. 012340   |
                       + 4321 .-+
                       ------
                       016661

  Figure 2-4.  Decoding an 80286 protected-mode segmented address. The
  segment selector 38H indicates an entry in a segment descriptor table. The
  segment descriptor contains a 24-bit segment base address which is added
  to the offset 4321H to give the 24-bit physical address 016661H.

  The 80386 also provides a "virtual 8086" addressing mode, in which
  addressing is the same as the usual 8086 16-bit addressing, but with the
  physical addresses corresponding to the 1 MB 8086 address space mapped
  anywhere in the 4 gigabyte (GB) 80386 address space. This lets an
  operating system execute several different 8086 programs, each in its own
  1 MB, 8086-compatible address space.

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