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 8086 divides the addressable memory space into segments, each of which
  contains 64 KB of memory. Each segment begins at a paragraph address--that
  is, a byte location that is evenly divisible by 16. To access individual
  bytes or words, you use an offset that points to an exact byte location
  within a particular segment. Because offsets are always measured relative
  to the beginning of a segment, they are also called relative addresses or
  relative offsets.

  Together, a segment and an offset form a segmented address that can
  designate any byte in the 8086's 1 MB address space. The 8086 converts a
  given 32-bit segmented address into a 20-bit physical address by using the
  segment value as a paragraph number and adding the offset value to it. In
  effect, the 8086 shifts the segment value left by 4 bits and then adds the
  offset value to create a 20-bit address.

  Figure 2-3 shows how this is done for a segment value of 1234H and an
  offset of 4321H. The segmented address is written as 1234:4321, with
  4-digit hexadecimal values and with a colon separating the segment and
  offset.

     1234:4321
  shift|    |
   left|    |
       |    |
       .    |
    12340   |
    +4321.--+
    -----
    16661

  Figure 2-3.  Decoding an 8086 segmented address. The segment value 1234H
  is shifted left 4 bits (one hex digit) and added to the offset 4321H to
  give the 20-bit physical address 16661H.

  On the 8086, there's obviously a great deal of overlap in the range of
  values that can be expressed as segmented addresses. Any given physical
  address can be represented by up to 212 different segmented addresses.
  For example, the physical address 16661H could be represented not only as
  1234:4321, but also as 1666:0001, 1665:0011, 1664:0021, and so on.

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