Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

himem.sys seemed like black-magic to me at the time.


It still does.

I mean, it pokes the keyboard controller in order allow the processor to control an additional bus line to the memory controller. Then, thanks to 8086’s overlappping segmentation architecture, you can access 65519 additional bytes that were never intended to be there in the first place.

There’s Cthulhu mythos that is more acc si le than that.


Wasn’t there himem on the 286 as well?


That is in fact when the A20 gate was introduced. I suspect the poster above was referring to 80x86 and not specifically the 8086. The 8086 (and 8088, 80186) could only address 1Mb of memory and only have 20 address lines, while the 80286 has 24 address lines. In real mode the 80286 is supposed to be compatible with the 8086. However, it has a bug where the A20 line is not 0 in real mode, which can cause problems with real mode software that relies upon address space wraparound using seg:ofs addressing. So Intel introduced the A20 gate which could be controlled by software and allowed or prevented address line 20 from being seen on the bus. Enabling it allowed your 80286+ real mode software access to an extra 65520 bytes of memory.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: