MS-DOS: Reasons for A20 Line Switching (71704)



The information in this article applies to:
    Microsoft MS-DOS operating system 5.0
    Microsoft MS-DOS operating system 5.0a
    Microsoft MS-DOS operating system 6.0
    Microsoft MS-DOS operating system 6.2
    Microsoft MS-DOS operating system 6.21
    Microsoft MS-DOS operating system 6.22

This article was previously published under Q71704

SUMMARY

This article explains why programs that enable the A20 line, such as HIMEM.SYS, always disable the line before returning control to the system.

MORE INFORMATION

When the A20 address line is enabled, a program can access the extended memory in the HMA (high memory area). If the A20 line is not enabled, calls to addresses above 1024K wrap back around to the bottom of memory rather than accessing the extended memory within the HMA.

At one time, programmers used the method of addressing memory above 1024K, knowing that the address would actually wrap back around to the beginning of memory. Programmers found the wraparound effect to be useful for some algorithms. If the A20 line is not disabled when a program that was designed to wrap around is executed, the HMA will be overwritten.

For this reason, any program that enables the A20 line must disable it before returning control to the system.

Modification Type: Major Last Reviewed: 5/12/2003
Keywords: KB71704