[PLUG] Segmented memor architecture -- Why is it bad?

Craighead, Scot D craighead.scot at vectorscm.com
Thu May 30 21:26:50 UTC 2002


>Please elucidate this subject.  Why did they choose a segmented memory
>architecture, and why is it bad?

I'm surprised you don't know what this refurs to.  Maybe it's because the
32-bit operating systems have pretty much solved the problem.  Back in the
DOS days, if you wrote assembly language programs, you cursed this daily.
Memory locations were made of 2 16-bit numbers, the segment and the offset.
This meant that there were were 6 "memory models" for a program.  In C, you
just had to tell your compiler which to use, but it was a big hassle if you
wanted to link in assembly modules to your C code.  You had the tiny memory
model, which used 1 16-bit addess for all code and all data, for example.
This means your entire program had to fit into 1 64K segment as well as your
variables.  Executable files the have the extension .com are this way.  Then
you had Small, one segment for code and another for data.  You can
extrapolate the rest from here.  To make things even worse, there eas the
640K barrier.  All the memory locations above this point were resurved by
the operating system.  So that's all the memory you get for your
applications programs.  Deal with it.  Then along came extended and expanded
RAM.  Two different ways to do the same thing, have access to more memory.
The only problem was that it was a major hassle to work with.  It is amazing
that PC's became so huge when they were designed so poorly.  Fortunate, only
programmers had to deal with this and Joe user had no idea.




More information about the PLUG mailing list