Someone should write an “Ode to 0xdeadbeef.” For a couple years, I taught an embedded systems class at NJIT and used deadbeef to initialize memory and find memory leaks and the like. My graduate students were initially confused that hex was useful for anything beyond binary conversions and writing ASCII characters to a display.
They tittered at cafebabe, feedf00d, and babe2bed. Poor deprived children.
I always taught wandering through the room, and repeatedly tortured these unwitting victims with random demands, “What is 2ˆ16? Why is it magic? What’s the hex value for ‘0′ and why is it a good one to memorize?”
From their initial stunned expressions, I could tell they secretly doubted the usefulness of such games, and wondered if Professor Simone was simply nuts. To my joy and happiness, they caught the bug and starting bringing their fun words to class.
Denton Gentry wrote a fun “looking back in time” entry (aptly named “[0123456789abcdef]” ), reminiscing when discovering new words was a cool sign of superior nerdhood. And nutty Professor Simone never thought of 0×0ddba11 or 0xf00f. Ah, opportunities wasted.



Sunday, 29. March 2009
Great Book! But note that in Chapter 1, the good old “DEADBEEF” is a tool/trick to see memory contents in HEX, not in ASCII as shown in Figures 1-3,4,6. DEADBEEF is supposed to BE the binary/hex data where ‘D’ is a nibble of 0×0D (13 decimal) not ASCII ‘D’ (0×44). So, DEADBEEF is normally 4 repeating bytes of: 0xDE, 0xAD, 0xBE, 0xEF. If you are able to see memory in ASCII anyway (like in the figures), then one would normally use something much easier to differentiate between the fill pattern and the new data. When I can see the data in ASCII, I use things like dashes ‘-’ or asterisks “*” or periods ‘.’ or whatever may be uniquely different than the normal data. The chapter is still great in how it shows the detective work needed to solve the bug.
Tuesday, 31. March 2009
Darrell,
True - I’ve seen it both ways, but you make a good point that what you explain is the original tool/trick. Not sure why I chose one over the other - perhaps I was trying to be really obvious between the DEADBEEF characters and the list of sci-fi authors in the same memory segment. Or a deadline perhaps? **grins** But you refer to the more traditional method.
I like using the DEADBEEF example for students because it is “fun” although I tend to use periods when I can see the ASCII like you do. I remember thinking creating words was the greatest thing - funny how things stick in your head!
Thanks for making a great contribution.
Glad you enjoyed the book - and thanks for the 0xacc01ade!
Lisa