MichaelPetch wrote:
Care to quote some?I'm very curious.
486 manual, order 240486: "A20M# is active LOW and must be asserted only when the processor is in real mode. The A20M# is not defined in Protected Mode."
Pentium manual, order 241428: "The effect of A20M# is undefined in protected mode. A20M# must be asserted only when the processor is in real mode."
Pentium Pro manual, order 242690: "A20M# must only be asserted when the processor is in real mode."
Pentium II manual, order 243502: "A20M# must only be asserted when the processor is in real mode."
...I can go on, but I think you get the idea.
MichaelPetch wrote:
The behavior of the A20 line (when it is enabled or disabled) and its effects on addressing are very well defined and the same effect in real or protected mode - when A20 is disabled physical addresses in odd number megabyte region map to the even number megabyte boundary preceding it.
What you've described is the simplest implementation of the A20 gate, but not the only one. For example, at least some of Compaq's Deskpro series used a system where only the second megabyte would be mapped to the first megabyte, and the remainder of the address space is unaffected.
MichaelPetch wrote:
If you write code that doesn't require data/code in an odd megabyte region your code should work as expected.
Most likely yes, but it's a bad idea to rely on undefined behavior.