The A20 line takes a bit of explaining.
When the IBM-AT was introduced, it was able to access up to sixteen megabytes of memory (instead of the 1 MByte of the IBM-XT). But to remain compatible with the IBM-XT, a quirk in the XT architecture (memory wraparound) had to be duplicated in the AT. To achieve this, the 20th line on the address bus (A20) was turned off.
Some programs (and bioses) were indeed expecting that 0xFFFF * 16 + 0x1234 would be 0x001224.
The A20 line is controlled by the keyboard controller unit, which is
usually a derivative of the
8042
chip. By programming that chip accurately, you can either enable
or disable bit #20 on the address bus.
When your PC boots, the A20 gate is always disabled, but some BIOSes do enable it for you, as do some high-memory managers (HIMEM.SYS) or bootloaders (GRUB).
This is a Glossary page, see Why cant I access all my memory? for more info.
