4 ms·
I remember seeing mention of "A20" in old BIOS settings, but I never knew what it did. Today, I know: it enabled access a 64k RAM region.
by ajtaylor 15y ago
I remember seeing mention of "A20" in old BIOS settings, but I never knew what it did. Today, I know: it enabled access a 64k RAM region.
- derleth 15y agoIt makes more sense when you know that 'A20 line' stands for '20th address line', and 2^20 (two to the 20th power) is one megabyte, so you need 20 bits to give unique addresses to all of the bytes in one megabyte.
- yuhong 15y agoAnd more importantly, how real mode segment-offset addressing worked.
- pgeorgi 15y agoSince those lines start counting at A0, it's the 21st bit. The thing is, with 20 bits you can address one megabyte, but without a 21st line, any calculated offset (be it indirect addressing or, more commonly, segments) will roll over. For compatibility with some ancient programs that exploited the rollover (access 0xfffff+0x400 -> 0x3ff), 80286+ gained the "A20 Gate", which allows to simulate the rollover effect (by always forcing A20, the 21st line, to 0) or not (in which case you can go above 1MB using offsets). Note that the A20 Gate is only active in 16bit modes, otherwise even more fun trickery becomes possible (since half the 32bit accesses with A20 pulled low would change, too)