display | more...
A20 refers to system address line 20 on the address bus in IBM-compatible PCs.

8088 processors, when referring to address lines greater than A19, would wrap around to the first address line. Some programmers made use of this 'feature' in their code. When the 80286 came along, with it's larger address space, lines above A19 existed and so the wrap around 'feature' no longer worked, and the processor would simply address higher areas in memory (those in the HMA - the Higher Memory Area.)

There is an option in BIOSes these days called 'Gate A20'. The purpose of this option is to restore the system to the state it was in the 8088 days, ensuring that addresses above 1MB of memory actually do wrap around, as they did before, thus ensuring that older programs would still work. It's a bit of a useless option really, since the programs that did use this feature have surely been superceded by newer programs, but it's there nonetheless.

For a more detailed explanation, see http://www.smsc.com/main/appnotes/an612.html

This relic is a major pain in the ass that can still be found in Pentium 4 PCs today, and is probably here to stay for even longer, for compatibility reasons.
To give you an idea how insane the whole idea is, consider the following:

To control whether or not the CPU should wrap around addresses above 1MB, you had to write something to a port of the keyboard controller, of all things.

You couldn't read back what the current state was. To find out, you wrote something to an address > 1MB and checked if it showed up at the beginning of the memory (in that case the address was wrapped around).

Log in or register to write something here or to contact authors.