X86 memory segmentation: Difference between revisions

Content deleted Content added
Clarification: BP does not have to refer to the stack; because it is designed to most of the time, it defaults to SS, but that can be overridden, and to imply otherwise would misinform the reader. The point is, besides pushes and pops, "data references to the stack" are whatever data references the programmer addresses to the stack; there are no stack-specific instructions for such references that are not pushes and pops.
Real mode: Cleaned up math example with non-breaking spaces so that the binary numbers will not break and wrap. (This probably really ought to be formatted as a table or something like that.)
Line 22:
{|
|-
! style=width:18em | <code>&nbsp; </code><code style="background:#DED">0000 &nbsp;0110 &nbsp;1110 &nbsp;1111</code><code>0000</code>
| '''Segment'''
| 16 bits, shifted 4 bits left (or multiplied by 0x10)
|-
! style=width:18em | <code>+ &nbsp;&nbsp;&nbsp;&nbsp; </code><code style="background:#DDF">0001 &nbsp;0010 &nbsp;0011 &nbsp;0100</code>
| '''Offset'''
| 16 bits
|- style="text-decoration:line-through"
! style=width:18em | <code>&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code>
|
|-
! style=width:18em | <code>&nbsp; </code><code style="background:#FDF">0000 &nbsp;1000 &nbsp;0001 &nbsp;0010 &nbsp;0100</code>
| '''Address'''
| 20 bits