Archive forDecember, 2005

So do you really use that thing, or is it just decorative?

As further evidence of how non-gadgety I am, I present my shopping list for this afternoon: One PS2 memory card.

Now, you wouldn’t think that’s particularly interesting until you realize that I’ve owned a PS2 for over a year and this is my first PS2 memory card. In fact, I didn’t realize till last night that PS2 games require different memory cards from PS1 games. It turns out that in all this time all I’ve done with my PS2 is play PS1 games and watch DVDs. You’d think I’d use a game console for, y’know, playing games made for the console, but apparently not.

Comments off

A history of gadgets

I’m not a gadget freak by any stretch of the imagination — I use my cell phone about two or three times a week and I don’t even know how to use its camera — but PC World’s 50 Greatest Gadgets of the Past 50 Years is a great read. Maybe that’s because I love history, and this is full of historical tidbits that I didn’t know. The first pager, the first answering machine, the first cordless phone — they’re all here. Neat stuff.

Comments (1)

Fun with variable-length instructions

One of the cool things about ISAs with variable-length instructions is that when you start disassembling at a random address you can get very interesting results as the poor disassembler tries valiantly to figure out what’s going on. Combine that with a rather large instruction set in which most instructions aren’t used any more and you can learn all kinds of things.

For example, who knew that the x86 instruction set has an instruction called BOUND? Not me, that’s for sure — until otool showed it to me tonight while trying to disassemble something in the kernel. I’ll never use it, of course, but it’s interesting nonetheless.

Update: In case you’re wondering why nearly nobody uses the BOUND instruction (aside from it being slower than the equivalent implementation using other instructions on all modern processors) there’s this note from the page above:

    A second problem with the bound instruction is that it executes an int 5 if the specified register is out of range. IBM, in their infinite wisdom, decided to use the int 5 interrupt handler routine to print the screen. Therefore, if you execute a bound instruction and the value is out of range, the system will, by default, print a copy of the screen to the printer. If you replace the default int 5 handler with one of your own, pressing the PrtSc key will transfer control to your bound instruction handler.

Neat. That’s a heck of a lot simpler than figuring out the printing APIs.

Comments (1)

google