himem.sys seemed like black-magic to me at the time.
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.