A twisty passage of Windows, all fragile

The HLT instruction tells the CPU (Central Processing Unit) to shut itself down until the next hardware interrupt. This is a big win on laptops since it reduces power consumption and thereby saves your lap from third-degree burns.
We (well, specifically, Jeff) had this implemented and working in Windows 95 but discovered to our dismay that there were many laptops (some from a major manufacturer) which would lock up unrecoverably if you issued a HLT instruction.
So we had to back it out.
Then the aftermarket HLT programs came out and people wrote, “Stupid Microsoft. Why did they leave this feature out of Windows.” I had to sit quietly while people accused Microsoft of being stupid and/or lazy and/or selfish.

“Hardw are Backwards compatibility [1]”

From Mark [2] come a pointer [3] to Raymond Chen's weblog [4], a developer from Microsoft [5]. An amazing insight into Microsoft development, covering why they did what they did (The Old New Thing: History) [6], and >why they do what they do (The Old New Thing: Code) [7].

Even if you aren't a developer for Microsoft Windows, it's still facinating reading, such as this little bit:

CreateMenu [8] creates a horizontal menu bar, suitable for attaching to a top-level window. This is the sort of menu that says “File, Edit”, and so on.
CreatePopupMenu [9] creates a vertical popup menu, suitable for use as a submenu of another menu (either a horizontal menu bar or another popup menu) or as the root of a context menu.
If you get the two confused, you can get strange menu behavior. Windows on rare occasions detects that you confused the two converts as appropriate, but I wouldn't count on Windows successfully reading your mind.

“What' s the difference between CreateMenu and CreatePopupMenu? [10]”

From reading Raymond's blog, it seems that Microsoft goes to great lengths to protect mediocre programmers and keep their programs running; their backwards compatibility legacy is quite impressive (I can still run an editor written in 1982 under MS (Microsoft)-DOS (Disk Operating System) 1.0 on Windows XP, some twenty-two years later). With so much legacy code (MS-DOS versions 1.0 (1981) through 7.x (1995) and Windows 1.0 (1985) through Windows XP) it's no wonder Windows is such a mess, much less that it still runs.

[1] http://weblogs.asp.net/oldnewthing/archive/2003/08/28/54719.aspx

[2] http://grumpy.conman.org/

[3] http://grumpy.conman.org/2004/01/23.1

[4] http://weblogs.asp.net/oldnewthing/

[5] http://www.microsoft.com/

[6] http://weblogs.asp.net/oldnewthing/category/2282.aspx

[7] http://weblogs.asp.net/oldnewthing/category/2281.aspx

[8] http://msdn.microsoft.com/library/en-

[9] http://msdn.microsoft.com/library/en-

[10] http://weblogs.asp.net/oldnewthing/archive/2003/12/30/46594.aspx

Gemini Mention this post

Contact the author