R.I.P. MS-DEBUG 1981 - 2009
AlphaZeta writes "After 28 years, MS-DEBUG is finally being phased out in Windows 7. Over the years, people have been using MS-DEBUG for writing code (virus/malware, you name it) and debugging. "
← Back to Stories (view on slashdot.org)
Acutally, the debug command was removed in Windows Vista & Windows Server 2008.
So much fond memories...
The Debug.exe was actually my first contact to programming and the first language I learned, was x86 assembler.
It was MS-DOS 2.xx and all my friends played with C64s and coded all kinds of cool things. My parents couldn't afford a C64 but they somehow got an old PC free. Demoscene was a new and hot thing in those days and me and my friend programmed our first demo completely using the Debug.exe. Merging the two code-bases was an interesting task, when all you had was two pieces of binary and some unused memory space for copy 'n' paste. The demo actually was quite cool. Unfortunately I have lost my only copy.
Back in the DOS 2.1 days when I got my first computer I didn't have any manuals. I quickly found debug, though, and saw all the strings in command.com. A bit later I actually used it for things like disassembling the boot sector and even writing some tiny programs via machine code since Microsoft's assembler and linker costs a fortune at the time and I was in junior high and beginning high school. I even used it to crack a number of programs via the disassembler command. There was also an improved version of debug I managed to get a hold of called symdeb.
When I got the Borland (RIP) Turbo Assembler and their debugger I stopped using it.
I haven't touched it in many years, especially since I moved away from Windows in the early 1990s, migrating first to OS/2 and later to Linux.
This post is encrypted twice with ROT-13. Documenting or attempting to crack this encryption is illegal.
so we don't need debug.exe anymore.
Anyone remember Borland Turbo Debugger or Microsoft Codeview? I used to use them to debug programs as well in Assembly Language.
Remember, Slashdot does not have a -1 disagree moderation, and no, troll, flamebait, and overrated are not substitutes.
... still use debug to do certain tasks. Getting rid of it was kind of pointless.
It's not like it hurts by sitting there on the harddrive, taking up a whopping 28K (or however big it is)....
-Clio
Karma: Bad (mostly from not giving a fuck)
Blog: http://clintjcl.wordpress.com
This was how I cracked Ultima V. They had a special sector on the floppy(!!) and read code off it, put it in the right place, and then ROT13ed that code.
I traced through until I was past that point, added nops where the read/ROT13 was, and rewrote the exe. I thought I was a genius.
RIP MSDEBUG.
... for XP64 and Vista64.
Here is my last tribute:
C:\Users\faragon>copy con hifolks.com
zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz^Z
1 files copied.
C:\Users\faragon>debug hifolks.com
-a 100
187E:0100 jmp 112
187E:0102 db "Hello Slashdot!$"
187E:0112 mov ah,9
187E:0114 push cs
187E:0115 pop ds
187E:0116 mov dx,102
187E:0119 int 21
187E:011B int 20
187E:011D
-w
Writing 00048 bytes
-q
C:\Users\faragon>hifolks.com
Hello Slashdot!
C:\Users\faragon>
"due to the fact that the x86-64 CPUs cannot switch to 16-bit mode."
????
AMD64 CPUs most certainly support real mode. In fact that is how they boot, how else would you expect the VGA bios to execute during boot?
They also support Virtual 8086 mode which you are confusing with 16-bit mode. The issue is that in Long mode (which is all that 64-bit MS OSs supprort) you cannot run in those modes. Instead you either run in 64-bit mode or compatibility mode (32-bit or 16-bit, no extra regs). MS certainly could have provided a way to switch between Long mode and Legacy mode but chose not to. Then when encountering a real mode program it would switch to Legacy mode. These switches are not cheap though, you'd likely have do things like quiesce DMA, and that is why MS decided to ditch it. In fact there was a similar issue with the 80286 and 16-bit protected mode, essentially a soft reset was needed to get back into real mode but that was done back then (with the advent of Windows 3.0) since so many programs would have been unusable otherwise.
Based off of this discussion, I'm guessing that the first line was supposed to be:
@debug <%0 >nul