Friday, May 08, 2009

DEBUG.EXE dropped in Windows 7

Wow. DEBUG.EXE is being finally phased out in Windows 7. I can't believe it was still there.

This brings me back two different memories. I had used this program in the past (a long while ago!) and it caused me both pain and joy.

Regarding pain: I had an MS-DOS 5.x book that spent a whole section on DEBUG.EXE, and one of the examples in it contained a command that caused the program in memory to be written to some specific sectors of the floppy disk. Guess what I tried? I executed that same command but told it to use my hard disk instead of the floppy drive. Result: a corrupted file system. Had to run scandisk (remember it?), which marked some sectors as faulty and I thought I had ruined my precious 125MB WD Caviar hard disk. It wasn't until much, much, much later that I learnt that such a thing was not possible, and that really formatting the disk with a tool that had no memory of "bad" sectors (aka, Linux's newfs) could revert the disk to a clean state. (Actually, I kept that hard disk until very recently.)

Regarding joy: On a boring weekend away from home, I used DEBUG.EXE on an old portable machine without internet connection to hack a version of PacMan. I disassembled the code until I found where it kept track of the player's lives and tweaked the counter to be infinite (or extra large, can't remember). That was fun. I could get to levels me and my father (who used to be an avid player) had never seen before!

It's a pity this tool is going, but it must go. It is way too outdated compared to current debuggers. I wonder if anyone is still using it.

Edit (Apr 1st, 2011): This is not a support forum for Windows issues. I've had to disable posting in this particular article because it was receiving lots of traffic and I don't want to moderate posts any more.

11 comments:

mirabilos said...

Oh noooooooooooo!

*cries*

It was such a superb tool to debug
stuff, easier to use than gdb, and
while not as fancy as Borland’s
Turbo Debugger 1.0, one could write
AND SAVE modifications or entire
programmes in it.

And I used it excessively in debugging
the MirBSD MBR, PBR (bootxx), boot-
loader (boot / ldbsd.com) early sy-
stem startup.

Curt Sampson said...

Someone whose father used to be an avid player of PacMan? Way to make me feel old, dude....

bishopHB said...

so that was it, hmm i have just finished installing w7. and im back to work, i use debug on my classes, but now, guess ill have to pull up a virtual os on top of my w7 just to be able to use it

Aaron said...

I concur it must go, it was very limited...in that it couldn't do 32 bit registers, not to mention 64 bit ones we currently enjoy. But, as you say, it was great for "debugging" programs of interest. I still use it on my XP machine to test ASM code...but then again, I'm a nerd who still writes code in ASM. :-)

Anonymous said...

Well, crap, I am not happy about this at all. I just got a free development tool taken away from me. It was great for small .com executibles and just as a hex viewer. Now I have to look for something new.

Miles Kehoe said...

DEBUG was a great way to poke around inside of files.. even text files. Quick, what control character do you suppose that is messing up a utility I've written? Well, load the sucked in debug, page thru from address 0x100 (good old CP/M). What tool do I have now to look into a file - a hex debugger? Someday this, and vi, will make a comeback!:)

Anonymous said...

I agree that's really a shame this tool is gone.
For a good hex editor I'd recommend HxD, great tool to edit binaries an even content of a disk (raw) and ram afair.

Anonymous said...

I'm really annoyed this keeps happening, you get used to a tool then MS drops it. Seems to be no equivalent in Win7, why can't they just update it?

Anonymous said...

I just found out ! what a loss.
I used this to write my first 8086 asm programs, before using masm. Now I rarely write asm anymore, not even on embedded :-(
Even much later I used debug as a hex editor for a long time until switching to HexWorkshop. I always liked that it was present everywhere you go. Most people have no idea what it does.... memories...
d 100

Anonymous said...

Well, nuts!

Someone I knew, a long time back, wanted a utility sent to him. How? By web mail! Attachments? No, he insisted, had to be via text!

No problem. Used debug to unassemble it all, made a script, and mailed him that. "Run this", I told him, "and the program will come out. It will take about three minutes, though." Worked fine.

What will we use to be clever now?

Petr said...

I used debug.exe for sweet tweak - clearing the CMOS memmory by few instructions.. Extreme usefull especially when any lammer get new computer and playing with SETUP security to protect his "valuable data". With PC not so big problem - simply clearing CMOS by MB jumper but notebooks have no jumper or its so deep =o) Especially when you cant download & ínstall software for clearing CMOS.. I am missing it so much in Windows 7. Is really no alternative in Win7?