Talk:Unreal mode
From Wikipedia, the free encyclopedia
Although not mentionned in the main article ATM, there was also the possibility of loading the descriptor part of the CPU segment registers by way of special so-called undocumented instructions on the 80286 - 386 and early 486, rather than switching to and fro between RM/PM. This opened the way to even more exotic "modes" than can be attained using the now standard technique. One very creative use of the capability is found in the 80286-specific code inside MS-DOS Himem.sys, allowing it not only to access the extended memory while staying in real mode all the time, using a REP MOVSW instreuction, but to do so with interrupts ALLOWED ! The trick is that not only are DS and ES pointing to extended memory, but also the CS selector is "desynchronised" so that an interrupt occurring in the middle of the move will return to some place different than the interrupted REP MOV itself, allowing the code to correct things, reload the "unreal" descriptors and resume the REP MOV where it left!!! Very ingenious, and I don't know the history of that piece of code but I doubt it originated inside of Microsoft in the 1st place. Rather from Intel ?
-- Ninho