Sucking up to Raymond Chen finally pays off



  • Todya's blog was inspired by this suggestion:

    mott555    20 Jul 2010 12:39 PM

    I'd enjoy hearing stories about sloppy/ugly code or strange workarounds or code comments during the development of Windows 95 (I'm assuming there are a few since it was a big jump from Windows 3.1), how they got there, anything TheDailyWTF-worthy. The type of code that works surprisingly well but makes you hate your life when you read it.

     


  • ♿ (Parody)

    It was a good suggestion. And Raymond, fan of TDWTF as he is, came through with a nice WTF.



  • I just about fell out of my chair when the first word of his entry was my name. Totally made my day. And no offense to TDWTF editors, but Raymond's WTF was better than anything we've had here in a long time, with the possible exception of today's make-the-new-guy-hold-the-power-button story.



  • Hey, another TDWTF user got mentioned in today's blog:

    Ben L observed that some shortcuts do not permit the command line and other options to be edited.



  • If you're still interested in strange or WTF code in Windows 95, try to find a copy of the book "Unauthorized Windows 95" by Andrew Shulman.  You can sometimes find a used copy on Amazon.  I used to have a copy and it was pretty interesting.  There was one section I still remember because it struck me as pretty wierd.

    Schulman was stepping thru some code and came to a place where the code jumped to a wierd address -- the address was located in his computers BIOS, specifically the copyright string.  The address contained the value 43h, the ASCII code for the letter "c".  It turns out that 43h is also the opcode for an extremely obscure x86 instruction called ARPL.  What ARPL does is irrelevant.  What was important was ARPL is an illegal instruction in protected mode.

    Win95 spent a lot of time switching back and forth between real mode and protected mode, so at startup Win95 would scan your computer's BIOS for the value 43h and save that address.  Then, whenever it needed to switch from protected mode to real mode it would jump to that address, which is an illegal instruction, which caused an error, which invoked an error handler and eventually you ended up back in real mode.*

    * I'm doing this from memory so you'll have to read the book for a better explanation.



  •  Hey, if the car runs into a wall, it stops just as well, right?



  •  Tentative link.... just hopped off one of Chen's blogs to this site:

    http://www.blogbyben.com/2008/01/handy-dev-tool-fake-credit-card-numbers.html

    Enjoy the "plz send the codez" comments.


Log in to reply