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 different addressing schemes used by the 80286 and 80386 are generally
  compatible (except, of course, for 32-bit addressing on the 80386).
  However, if you are writing an 8086 program that you intend to convert for
  use in protected mode, be careful to use segments in an orderly fashion.
  Although it's possible to specify a physical 8086 address with many
  different segment-offset combinations, you will find it easier to convert
  8086 programs to 80286 protected-mode addressing if you keep your segment
  values as constant as possible.

  For example, imagine that your program needs to access an array of
  160-byte strings of characters, starting at physical address B8000H. A
  poor way to access each string would be to exploit the fact that the
  strings are each 10 paragraphs long by using a different segment value to
  locate the start of each string:

    B800:0000H (physical address B8000H)
    B80A:0000H (physical address B80A0H)
    B814:0000H (physical address B8140H)
    B81E:0000H (physical address B81E0H)

  A better way to accomplish the same addressing would be to keep a constant
  segment value and change the offset value:

    B800:0000H (physical address B8000H)
    B800:00A0H (physical address B80A0H)
    B800:0140H (physical address B8140H)
    B800:01E0H (physical address B81E0H)

  Although the result is the same on an 8086 and in real mode on an 80286,
  you'll find that the second method is much better suited to 80286
  protected mode, where each different segment selector designates a
  different segment descriptor.

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