PCBUILD Archives

Personal Computer Hardware discussion List

PCBUILD@LISTSERV.ICORS.ORG

Options: Use Forum View

Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
David Gillett <[log in to unmask]>
Reply To:
PCBUILD - Personal Computer Hardware discussion List <[log in to unmask]>
Date:
Wed, 2 Jun 1999 15:09:36 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (42 lines)
On 2 Jun 99, at 12:30, Tom Turak wrote:

> The A20 line is for memory addressing.  I barely remember, but I think it
> was a weird way to address memory beyond the capacity of the old 16 bit
> address registers on old 8086 cpus to reference directly.  I think it was
> last used only in IBM OS/2, ....

  The 8086 and 8088 provided 20 address lines, designated A0 through A19,
allowing a physical addresses from 0 to 2^20-1, or 1 MB.  The maximu "segment
base address", though, was FFFF0, only 16 bytes below 1MB, offsets of 16 or
more from this base would normally carry into a twenty-first address line --
since there was no such line, the effect was that these addresses would wrap
around into the lowest 64K of the address space.

  When the 80286 increased the number of address lines to 24 (80386DX later
pushed that to 32), a twenty-first address line became avaiulable.  By using
this line, it was possible to add almost 64K to the address space reachable
while the CPU was still in "real" (DOS...) mode.  Unfortunately, there could
be code around that depended upon the old wrap-around behaviour.

  The solution was to connect the A20 line through an "AND" gate, allowing it
to be enabled or disabled by an external signal.  This signal would always be
"on" when the CPU was in a "protected" mode; in "real" mode, it would
normally be "off", but could be turned on momentarily/temporarily by
applications that knew it was safe to do so.  [The primary use was to
relocate DOS and drivers into this high memory region, so the code to control
the signal was incorporated into HIMEM.SYS.]
  On some of the first PCs to permit this, the physical signal to the gate,
to enable or disable the A20 line, was implemented using a spare line from
the 8048 (CPU used as the) keyboard controller.  Several other arrangements
have been used over the years; code to support all of the common ones are in
HIMEM.SYS, and I think it even has command-line arguments to specify the
mechanism in case it doesn't recognize your hardware automatically.  Most
people haven't had to worry about this in several years.


David G

            Do you want to signoff PCBUILD or just change to
                    Digest mode - visit our web site:
                    http://nospin.com/pc/pcbuild.html

ATOM RSS1 RSS2