🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.programmer
Article #5637

Re: memory

#5637
From: DJ Delorie
Date: Thu, 04 Apr 1991 15:32
54 lines
2995 bytes
In article <252u3715.670712175@fergvax> 252u3715@fergvax.unl.edu (Teik Leong Tan) writes:

>I have seen gate-A20 being displayed on my screen before, but never
>really knew what it is for. Does it mean that if A20 is disabled, then
>the computer will have more access to its memory, and that this extra
>memory would be available to DOS applications as expanded memory?

Gate-A20 is a kludge put into the original AT to make it more backward
compatible with the XTs.  It turns out that some applications
*required* that the memory space wrap at the 1M boundary (examples:
CPM-86 and MS Flight Simulator 2.x).  When you enable gate-A20, the
_hardware_ shuts off address line #20, so that memory references in
odd numbered 1M regions (like 1M-2M) instead go to the even region
before it (like 0M-1M).

>By the way does "high" memory refers to expanded memory only? Or does
>"high" memory include both expanded and extended memory?

High memory does not refer to expanded memory, only a small range of
extended memory.  When you refer to, say, address FFFF:0000, you get
physical address FFFF0 (seg*16+ofs).  Thus, FFFF:0010 is physical
100000! FFFF:1000 is 100FF0, etc.

>How can I enable or disable gate-A20?

This is tricky at best.  The AT class method involves sending a stream
of commands to the keyboard controller (non-trivial).  The PS/2 has an
I/O port that toggles it (trivial).  Check out an AT hardware tech ref
manual for detailed information.

>From what I know, himem.sys only makes available 64K of high memory.
>Does anyone out know of other software that would provide us with more
>high memory than himem.sys, and which is relatively cheap, say free?

How about the BIOS itself?  Functions 0x87 (I think) of INT 15h allows
you to transfer blocks of data between conventional and extended
memory.

>Many a time, my friends would come across "insufficient memory" errors
>when they try to run some games. This is especially irritating when we
>are in the middle of playing an exciting game.

Lots of software are designed to be compatible with the XT.  They
can't take advantage of the AT's extra memory because the XY can't
to that.  Some can autodetect a 286 or 386 and do different things,
but most don't - it's cheaper to develop it that way.

Trimming drivers and TSRs out of config.sys and autoexec.bat is the
only globally accepted way of getting more memory.  Even if you run
under Windows, you might not get all of your memory back, as Windows
itself uses some of it to communicate with your process.

DJ
dj@ctron.com
Technical Details
Message-ID: <1396@bragi.ctron.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!samsung!bragi!dj
References: <1991Mar29.163548.768@maverick.ksu.ksu.edu> <1364@bragi.ctron.com> <252u3715.670712175@fergvax>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!samsung!bragi!dj
From: dj@bragi.ctron.com (DJ Delorie)
Newsgroups: comp.os.msdos.programmer
Subject: Re: memory
Message-ID: <1396@bragi.ctron.com>
Date: 4 Apr 91 15:32:17 GMT
References: <1991Mar29.163548.768@maverick.ksu.ksu.edu> <1364@bragi.ctron.com> <252u3715.670712175@fergvax>
Organization: None whatsoever
Lines: 54