Path: utzoo!utgpu!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!cs.utexas.edu!sm.unisys.com!ism780c!ico!nbires!maa From: maa@nbires.nbi.com (Mark Armbrust) Newsgroups: comp.sys.ibm.pc Subject: Re: 640kb limit on DOS? Summary: Windows access to memory above 1Meg Keywords: 640K HIMEM.SYS Message-ID: <197@nbires.nbi.com> Date: 12 Dec 88 23:40:58 GMT References: <8043@ihlpl.ATT.COM> <3521@nicmad.UUCP> <593@tapa.UUCP> <10687@s.ms.uky.edu> <3534@nicmad.UUCP> Reply-To: maa@nbires.UUCP (Mark Armbrust) Distribution: na Organization: NBI Inc, Boulder CO Lines: 26 In article <3534@nicmad.UUCP> brown@nicmad.UUCP (Vidiot (Vid-e-it)) writes: > >PS/MS-DOS does not, nor can it ever, access anything except the first 1 MB >of memory. The first 640K being RAM and the rest being various hardware. >DOS is designed for the lowest common chip, the 8088, which only knows 1MB. > >Even if you run Windows/386, DesqVIEW or VM/386, the DOS partition that is >created can only run like an 8088, ie, 640K of user memory for programs. > With Windows 2.1 is supplied a driver, HIMEM.SYS, that allows applications that know how to use it to get to slightly less than 64K of memory above the one megabyte limit. It makes use of a feature? of the 286/386 chips: when the physical address is calculated, there is a carry into the A20 line. AT's have an I/O bit controlled by the keyboard coprocessor called "A20 gate" that normally forces A20 to 0 so that these overflow addresses will wrap around back to 0. The convention is that a segment register is set to 0xFFFE, and then 65503 bytes of memory are available at offsets 0x0020 - 0xFFFF. To use this memory, A20 gate must be disabled. A20 gate was included in the AT design to allow programs that expected the address to wrap in the 8088 way to run on AT's. Happy Hacking, Mark