[comp.sys.ibm.pc.hardware] A little confused...

sellers@maverick.esd.sgi.com (Scott Sellers) (01/05/91)

I posted this before, but i don't think it made it to the newgroup...

Anyway, i am new to the pc world and am confused over how DOS handled memory.
Please correct me if I am wrong, but I believe that, without any memory 
management programs, a program can only use the lower 640K of memory.  DOS itself, though, occupies some of that area, so you only have about 580K to work with.

Let me preface the rest of this message by saying that I have an 386 clone, which should be able to access higher memory (32 bit machine).
Anyway, I have 2 MB installed, and have not figured out how to allow programs to use this extra memory...

first off, what is "extended" versus "expanded" memory?  Which is referenced by
EMS?  What is EMS 4.0?  Does a software program have to be specifically written to take advantage of higher memory, or will a good memory manager allow a program to automatically use the higher memory.

It seems a waste, that as of now, I am unable to use over 1M of memory!

An unrelated question:  does anyone know of a software program that could
load in memory and act as a printer buffer?

Also, in regard to the previous question, does anyone know of a good memory
manager to accomplish what I am describing?

thanks in advance...

sellers@sgi.com

silver@xrtll.uucp (Hi Ho Silver) (01/06/91)

   Don't we have a FAQ (Frequently Asked Questions) in this newsgroup?  If
not, we should grab one (there used to be one in comp.sys.ibm.pc) and edit
out the non-hardware stuff.  Heck, if someone sends me one, I'd be happy
to keep it up-to-date and post it from time to time.

   Also, please put linefeeds in your lines _before_ they get to 80
characters.  In fact, it's a good idea to go no longer than 75 characters
to allow space for other people to include your text in their followups.

In article <1991Jan5.002714.23607@odin.corp.sgi.com> sellers@maverick.esd.sgi.com (Scott Sellers) writes:
$Anyway, i am new to the pc world and am confused over how DOS handled memory.
$Please correct me if I am wrong, but I believe that, without any memory
$management programs, a program can only use the lower 640K of memory.  DOS
$itself, though, occupies some of that area, so you only have about 580K to
$work with.

   Close.  Depending on how you have your extra memory set up, some programs
will know how to use it.  More on that later.

$first off, what is "extended" versus "expanded" memory?  Which is referenced
$by EMS?  What is EMS 4.0?  Does a software program have to be specifically
$written to take advantage of higher memory, or will a good memory manager
$allow a program to automatically use the higher memory.

   Extended memory is memory which sits above 1M in the CPU's address
space.  It is available only on 80286 and higher machines, as the 8086/8088
can only address 1M of memory.  In the old days, there were no standard
for using extended memory; any program which wanted to use it just came
along and grabbed some.  There is now the XMS standard (implemented in
HIMEM.SYS, QEMM386.SYS, etc.) which provides a standard interface to it,
and also relieves the programmer of some of the problems involved with
access memory beyond the first 1M.

   Expanded memory can be installed on any PC, regardless of its CPU.  It
is a method by which a portion of the 1M address space (the "frame") is set
aside, and small chunks of the expanded memory ("pages") are made to appear
as if they live in the frame.  A expanded memory manager is required to
manage this memory.  This is the type of memory called EMS.

   In all cases, a program must be specifically written to take advantage
of the extra memory.  On 386 machines, though, you can get software that
takes advantage of the 386's memory management hardware to load some of
your device drivers and TSRs (terminate-and-stay-resident programs such
as Sidekick, print spoolers, etc.) to live in unused spaces in your first
1M of memory.  This will free up some of the first 640K, and that leaves
more free memory for all of your programs to work with.

$An unrelated question:  does anyone know of a software program that could
$load in memory and act as a printer buffer?

   Yup, there are lots of them.  I'm still using one called MSPOOL.  The
version I have was written in 1983!  But it works fine, and I'm using QEMM
to load it and its 63K buffer outside of the usual 640K range.

$Also, in regard to the previous question, does anyone know of a good memory
$manager to accomplish what I am describing?

   Now you're asking for a religious war between the supporters of various
memory managers :-)  QEMM will allow you to load some of your resident
software outside the 640K range, and will allow programs to access your
extended memory as either extended or expanded.  There are others (e.g.
386^MAX) that I'm not familiar with; I'll let others comment on them.
-- 
 __            __  _  | ...!nexus.yorku.edu!xrtll!silver |  always
(__  | | |  | |_  |_) >----------------------------------< searching
 __) | |_ \/  |__ | \ | if you don't like my posts, type |    for
_____________________/  find / -print|xargs cat|compress |   SNTF