Gaming: Shift Key Trick To Quickly Restart Windows 95 Wasn't A Placebo, It...

Gaming: Shift Key Trick To Quickly Restart Windows 95 Wasn't A Placebo, It...

One of Microsoft's veteran software engineers explains the full 'secret sauce'.

Back in the 1990s, my fellow PC chums and I thought we had stumbled across a magic trick with Windows 95, something that we thought nobody else knew about: holding the shift key when you hit restart just fired up the operating system again, not the whole PC. Alas, it turns out that we were all just very naive, and Microsoft's software engineers had deliberately coded this functionality.

Yes, I know that's blatantly obvious—it's not like Windows 95 was created out of mystic spells and ground up weevils—but back then, there was surprisingly little in the way of information about the inner workings of Windows, let alone any comprehensive guides to every function and feature.

In his Old New Thing blog, Raymond Chen explains the 'secret sauce' behind what was going on with the whole shift+restart trick. Just as it does now in all versions of Windows, clicking on restart in Microsoft's then massively updated Windows 95 forced the PC to initiate a cold reboot, i.e. shutdown all processes, clear the memory, and cycle the hardware.

However, holding down the shift key forced a different process: the PC wouldn't restart, just the operating system itself, displaying 'Windows is restarting' on the monitor. Chen describes the overall process that takes place as follows.

"What happens is that the 16-bit Windows kernel shuts down, and then the 32-bit virtual memory manager shuts down, and the CPU is put back into real mode, and control returns to win.com with a special signal that means 'Can you start protected mode Windows again for me?'

"The code in win.com prints the 'Please wait while Windows restarts…' message, and then tries to get the system back into the same state that it was in back when win.com had been freshly-launched.

"[If] everything looks good, [then] win.com jumps back to the code that starts protected-mode Windows, and that re-creates the virtual machine manager, and then the graphical user interface launches, and the user sees that Windows has restarted."

Keep up to date with the most important stories and the best deals, as picked by the PC Gamer team.

Real mode for CPUs back then was a 16-bit, barebones level of function support, whereas protected mode, the normal state for running Windows, enabled better security, much larger memory mapping, and so on. But as Windows 95 existed at a time when there were still a lot of 16-bit applications and hardware around, PCs

Source: PC Gamer