Your first PC must have been a 386. As Brian explains some of the
history...
Brian said:
Segment addresses didn't become segment selectors until 286 protected
mode came out; and the flat memory model wasn't available until the
386, when the OS got the choice of running in real, 286 or 386
protected mode (remember the different Windows versions for each),
with multi-megabyte selector sizes which allowed the OS to set the
same base address and length for all the selectors to allow a flat
address space (and virtual 86 mode for a process in protected mode).
The Intel 8086 (8088) had a 20-bit (1 MB) address space. Addresses were
composed of a 16-bit segment and a 16-bit offset; an address was formed by
shifting the segment by 4 bits and adding the offset, resulting in a 20-bit
byte address.
The 286 enhanced the model by adding a mode that treated the 16-bit
segment of an address as a "segment selector", which chose a given 64 KB
segment from within a 24-bit (16 MB) total address space. Pointer
arithmetic consequently was even more complicated in this mode.
The 386 further enhanced the addressing scheme by adding a 32-bit mode
supporting 32-bit offsets within 32-bit (4 GB) segments, yielding a total
memory space of 4 GB (or more in later models). This is the so-called
"linear" addressing model. But it's not completely linear because each
pointer still uses an implied segment selector (depending on the
instruction it's used with). Most programmers don't notice this because
most OS's built on this architecture initialize all of the segments
(there are six) to overlap and begin at the same base address, so that
it acts like a flat 32-bit address space.
So it's incorrect to assume that on a 386 architecure that a given
byte address can be truly represented by a 32-bit integer value.
It's a function of the way the operating system has chosen to use
the underlying segment registers (see above). Assuming that the 4 GB
segments are all aligned and overlapping, you can convert a byte
address into a unique 32-bit integer. But on systems where you can't
make this assumption, a byte address translates into a 32-bit offset
within a particular 4 GB segment within physical memory.
It's also incorrect to accuse Microsoft of deciding that a linear memory
model was better before there even existed PC hardware that supported
such a thing. Sure, Microsoft probably made some bad design choices
along the way (e.g., the way their compilers performed pointer/integer
conversions), but they didn't have much choice because of the funky
segmented addressing model of the Intel PC hardware. Microsoft didn't
make the machines, after all, they just wrote software for them.
-drt