2014 year-end link clearance

Another round of the semi-annual link clearance. Do you hear any Christmas music right now? Good. Christmas songs can be played only 1/12 of the year, and people who write algorithms for computer-generated playlists need to identify Christmas songs so that they don’t select them during the other 11/12 of the year. Also, so that…


Even the publishing department had its own Year 2000 preparedness plan

On December 31, 1999, Microsoft Product Support Services were ready in case something horrible happened as the calendar rolled over into the new year. I’m told that Microsoft Press also had its own Year 2000 plan. They staffed their helpline continuously from Friday evening December 31, 1999 all the way through Sunday, January 2, 2000….


How did that program manage to pin itself to my taskbar when I installed it?

Occasionally, somebody will notice that upon installing a program, it managed to pin itself to the taskbar. But just like there is no Pin­To­Start­Menu function, there is also no Pin­To­Taskbar function, and for the same reason: Because applications would abuse it and auto-pin themselves because they are so awesome, and so that the developer could…


Integer signum in SSE

The signum function is defined as follows: signum(x) =  −1  if x < 0 signum(x) =  0  if x = 0 signum(x) =  +1  if x > 0 There are a couple of ways of calculating this in SSE integers. One way is to convert the C idiom int signum(int x) { return (x >…


Debugging walkthrough: Access violation on nonsense instruction

A colleague of mine asked for help puzzling out a mysterious crash dump which arrived via Windows Error Reporting. rax=00007fff219c5000 rbx=00000000023c8380 rcx=00000000023c8380 rdx=0000000000000000 rsi=00000000043f0148 rdi=0000000000000000 rip=00007fff21af2d22 rsp=000000000392e518 rbp=000000000392e580 r8=00000000276e4639 r9=00000000043b2360 r10=00000000ffffffff r11=0000000000000000 r12=0000000000000001 r13=0000000000000000 r14=000000000237cfc0 r15=00000000023d3ea0 iopl=0 nv up ei pl zr na po nc cs=0033 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00010246 nosebleed!CNosebleed::OnFrimble+0x1f891a: 00007fff`21af2d22 30488b…


My pants are fancy!

During the development of Windows, the User Research team tried out an early build of some proposed changes on volunteers from the general community. During one of the tests, they invited the volunteer to just play around with a particular component, to explore it the way they would at home. The usability subject scrolled around…


How can I let my child use an app that I bought from the Windows Store?

If you buy an app from the Windows Store, you can make it available to other users on the same Windows PC. This is useful if you, say, buy an app for your child to use. Here’s how you do it. (This is all explained on the Windows Store blog, but I’ve converted it into…


Setting, clearing, and testing a single bit in an SSE register

Today I’m going to set, clear, and test a single bit in an SSE register. Why? On Mondays I don’t have to explain why. First, we use the trick from last time that lets us generate constants where all set bits are contiguous, and apply it to the case where we want only one bit….


How did protected-mode 16-bit Windows fix up jumps to functions that got discarded?

Commenter Neil presumes that Windows 286 and later simply fixed up the movable entry table with jmp selector:offset instructions once and for all. It could have, but it went one step further. Recall that the point of the movable entry table is to provide a fixed location that always refers to a specific function, no…