R.I.P. MS-DEBUG 1981 - 2009 240
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. "
Single tasking: Just Say No.
/.'ed already? (Score:4, Funny)
Wow, two comments and /.'ed already. Who knew MS-DEBUG had such power to make people want to actually RTFA!
Re:/.'ed already? (Score:5, Funny)
Their webserver was built using MS-DEBUG
Number of comments not showing on front page (Score:2, Insightful)
Is /. broken today?
But not too worry... (Score:5, Funny)
... a new sourceforge project called Open-Debug is being created to replace it.
Re: (Score:2, Funny)
OMG (Score:4, Funny)
You bastards!
Re:OMG (Score:5, Funny)
Re: (Score:2)
Re: (Score:2)
Really?
top running on an X-less server.
Confusing and foreign enough for the masses.
it's a trick (Score:5, Funny)
Sad day (Score:5, Interesting)
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.
Re: (Score:2)
Re: (Score:2)
My parents couldn't afford a C64 but they somehow got an old PC free.
That's really, really odd. C64s were always an order of magnitude cheaper than PCs. By 1983 C64s were maybe $300, while a PC with any decent accessories was well into the $3000 range.
I'd say you got lucky, but the C64 was a better piece of kit anyway :P
Re: (Score:2)
It's not hard to do. I had a PC at home because I would bring it home from work (Leading Edge) and I had several a few years later, partly because a company I was working for went out of business taking my last two pay checks. I got two PCs and a Toshiba 1100+ laptop instead.
[John]
Re: (Score:3, Insightful)
Re: (Score:2)
But the C64 was discontinued in April 1994. So, if it were that late... new C64 vs. old 8088 PC...
Re: (Score:2)
Debug (Score:5, Funny)
I used it to write and modify code (Score:4, Interesting)
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.
Re:I used it to write and modify code (Score:5, Interesting)
Here is another former TASM user piping up.
I remember when I was kid (pre-TASM) and my dad got a blazing fast internal ISA 2400 baud modem (hee hee). But it would not work right in Windows 3.0, it worked fine in a DOS program. Back then you had to assign an IRQ and port. The internal cards used the same as COM1 and COM2, but it should have been okay. The ISR should have checked the first card and then chained to the next. But it simply was not working, we had a serial port mouse and the other serial port was used for a printer (the machine had two printers one for carbon copy forms the other a laser printer for letters on the parallel port).
So after trying everything that I could think of I called MS support. Back then things were VERY different. The lady that answered spoke pacific NW English and was incredibly competent. She explained that some BIOSes were buggy and did not do the IRQ chaining correctly. We could not find an IRQ that was free that the modem card had a jumper for so she walked me over the phone commands to do in debug to patch a driver in Windows 3.0 to get around this issue. I was a freshman in high school at the time, that really left a mark on me. I had just learned how to use edlin before that. Soon after I got a copy of Turbo Pascal from this Polish guy I knew and I never looked back.
Before then I had only done Basic and later TASM (no relation Turbo ASM, that is what the cartridge+floppy interface was called, probably Tandy ASM) programming on a CoCoII. But that few minutes in debug got me hooked on modern systems and led to C/C++ TASM by the time I finished high school. I got a summer job just so I could afford Borland C++, it was something like $400 (student discount, I could not sell programs I compiled), the printed manuals it came with were incredible. DOS, Windows, dBase, WP all had incredible printed manuals too. Man have times changed.
Before TASM I sure did used debug a lot. It was a cheap assembler, disassembler (I needed to figure out some VGA routines from Borland), and you could use it a lot like you would dd on unix too.
Re: (Score:2)
Any suggestions on a good program and book to start into ASM these days? I've poked around some, but a lot of the ASM projects out there have either stalled or seem to expect some experience. I'm fine with either Linux or Windows as a platform.
I kind of feel like I missed out on the golden age of assembly programming.
Re: (Score:2)
No one uses assembly any more, not on a desktop platform.
Only place you'll find it is embedded device code or in special cases as inline code chunks within drivers, compilers, graphics code, etc., where you're trying to tweak the code to run "just so" because the compiler keeps building it "wrong" and you know this other way is better/faster/more correct.
Re: (Score:2)
I kind of feel like I missed out on the golden age of assembly programming.
You did, because the hardware is so far removed from Assembly. But... assembly is still out there at least as a hobby on desktops.
Re: (Score:2)
NASM [www.nasm.us] is still alive and kicking, it's latest release was about 3 days ago, there are plenty of tutorials [google.com.au] and plenty of example code [sourceforge.net] around to get you up to speed.
Personally, my fav x86 assembly program was A86 [eji.com], i found it much easier to use that NASM.
Re: (Score:2)
I remember using it for things like that as well. I also remember my father got an EPROM programmer that was hard wired to use the same port as his graphics card and it was hard coded into the DOS program. A bit of work with a soldering iron changed the port but I had to go in via debug and patch the program to use the new port. I also used it back in the day to dump BIOS or to write to specific I/O ports and memory locations to experiment with different things.
Sad... (Score:5, Funny)
I hope Mr. Debug gets over his loss soon.
Re:Sad... (Score:5, Funny)
Speaking of which, I hear Mr. DOS is paying steep bills for his wife's life support.
Re:Sad... (Score:5, Funny)
Re: (Score:2, Funny)
Especially not when you factor in the therapy from Dr Sbaitso.
Re:Sad... (Score:5, Funny)
They could've gone to the FreeDOS clinic.
Re: (Score:2)
Man, you really have to be old to remember Dr. DOS.
What are you talking about? It was released in 1988. I'm in my 20's (albeit late 20's) and I remember Dr Dos.
Re: (Score:2)
Dr. Watson is still around (as of XP), but he has been largely replaced by Windows Error Reporting tool, which sends crash dumps of programs to Microsoft (assuming you allow it), who makes the dumps available to the author of the application in question (assuming they have jumped through all the right hoops).
Dr. Watson was not included in Vista.
Re: (Score:2)
Oh goodness, don't even get me started...
--- Mr. DOS
Re: (Score:2)
Since she was going by MS-DOS rather than MRS-DOS, their relationship was probably on the rocks anyway.
I heard she left him after she found him in bed with a pre-op tranny by the name of MS-Bob.
But Visual Studio has its own Debug mode (Score:3, Interesting)
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.
Re:But Visual Studio has its own Debug mode (Score:5, Informative)
Re: (Score:2, Funny)
Re: (Score:3, Informative)
The primary free windows debugger is WinDBG, which is available for free download from Microsoft. Recent versions have been distributed as part of the Debugging Tools for Windows, in which the core engine has been re-factored out to a dll, and 3 different command line interfaces to the engine are included. See: http://www.microsoft.com/whdc/devtools/debugging/default.mspx [microsoft.com]
Re: (Score:2)
Real men (assuming you acknowledge the existence of any such who use Windows - this is /. after all) use WinDbg [wikipedia.org]!
first, best use (Score:5, Funny)
Using it to change this string in command.com
"Abort, Retry, Fail?"
to
"Abhor, Retch, Fume!"
Note that it fits in exactly the same number of bytes. That's important.
Re: (Score:2)
I've got Vista installed on a laptop. The UAC is sometimes killing me though, I'll switch it off later. But now that you let me remember that question, I can rest assured that it was at least MUCH better than that Abhor,Retch,Fume that seemed to do *exactly* the same no matter which one of the confusing options you took. Even now I don't understand the difference between Abhor and Fume.
And no, I DON'T wanna know (some imbecile is going to explain anyway, but at least I tried).
Re: (Score:2, Funny)
Well, "Abort" means you recognize that it's broken and are telling it to give up, this is what they did to DOS, which brought us Windows 95. In many ways, it was a lateral move.
"Retry" means, yes, we admit it's broken, but we can do better. This was Windows NT.
"Fail" == Vista
Re: (Score:2)
The real meaning...
Retry is obvious. It trys again.
Abort tells it to abort the operation - for example, if you're copying files, and there's a disk error, Abort will stop the copy altogether.
Fail tells it to fail just that stage of the operation - for the copying files example, that sector or that file won't copy, but the rest of the copy operation will continue.
And, you missed Ignore, which is a special version of fail - it tells it to use the erroneous data anyway.
feh (Score:5, Interesting)
It's not like it hurts by sitting there on the harddrive, taking up a whopping 28K (or however big it is)....
Re:feh (Score:5, Informative)
Modern hard disks, as in anything made after 1994, should never be subjected to an LLF. The tracks and sectors are defined at the factory physically and you cannot change them. Now, what I think you mean to say is you 'reinitialized' or wrote zero's over the entire disk. Almost every disk manufacturer makes a utility to do this that you can download from their website. This ignores partitions, so it will fix a corrupted partition table.
Re:feh (Score:5, Informative)
In linux just use dd to write 512 zeros to /dev/hda (or /dev/sda or whatever the base drive is) for example
dd bs=1 count=512 if=/dev/zero of=/dev/hda
That will wipe the boot block clean, then you can use it like a brand new drive.
Or if you want, just zero out the partition table using a seek=466 and a count=64 instead of the count=512
Re: (Score:2)
Typo (Score:4, Informative)
Re: (Score:3, Interesting)
Re: (Score:2)
Re:feh (Score:4, Interesting)
I wrote most of the FAQ for Computing.net forever ago:
http://www.computing.net/faq/contentdos/badsector.html [computing.net]
I think its been close to 15 years ago now... Little things you put out of your mind until someone brings them back up. Strange to see what a following my work has gotten these days.
Wrong, Wrong and Wrong (Score:5, Informative)
This article is entirely wrong. DEBUG.EXE hasn't been removed from Windows 7. It's just not included in 64-bit editions of Windows. That goes for 64-bit editions of Windows 2000, Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008 and Windows 7. This is because the 16-bit emulator is no longer included in the 64-bit versions of Windows due to the fact that the x86-64 CPUs cannot switch to 16-bit mode. So it's not DEBUG.EXE that is gone, it's all of DOS that is gone.
Re:Wrong, Wrong and Wrong (Score:5, Interesting)
"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.
Good ole' debug (Score:3, Funny)
Awwww.... (Score:4, Interesting)
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.
old ESDI drives... (Score:2)
I remember having to use debug to format ESDI drives back in the day. They should keep it around - it's still a power tool. What, do they think there will be fewer people writing viruses if it is gone? As though there aren't alternatives out there?
All the useful tools are going (Score:2)
DEBUG on the way out? Next they'll be trying to remove EDLIN? Where will it stop?
(Bizarrely, the only time I have ever used EDLIN was to administer some dual-boot Linux / Windows NT boxes. I wrote a perl/Expect script that telnetted to each machine running Windows, used EDLIN to change boot.ini, and then ran 'shutdown -r'.)
Already gone... (Score:3, Interesting)
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>
BEST POST OF MONTH (Score:2)
BEST POST OF MONTH
E D24 7F FF (Score:2)
Re: (Score:2)
Slashdotted: original article (Score:5, Informative)
MS-DEBUG 1981 - 2009
May 8, 2009, 11:16 am
Earlier this week (May 5) Microsoft Windows 7 Release Candidate was released to the general public and like many technology enthusiasts I downloaded a copy early in the morning hours on Tuesday, shortly after Microsoft made it available on its website.
The RC build of Windows 7 (build 7100) has many tweaks over the previous beta build I have (build 7000) and I have not yet played with it long enough to come up with any meaningful conclusions. However, this is not the point of this article. As you might have noticed from the title of this article, I was not about to talk about my experience with Windows 7 (maybe I will write about it later). What I noticed the first thing in Windows 7 is that the DEBUG command is nowhere to be found.
I was just old enough to remember the very early days of DEBUG under MS-DOS. In fact, I was fascinated with such a small and yet powerful tool that came with every version of MS-DOS distribution. the DEBUG command was so powerful that you could do almost anything with your machine with sometimes just a few key strokes.
For a long time, I used DEBUG to learn x86 assembly language and to learn about disk (both floppy disks and harddrives) structures and file systems. And occasionally, I would use DEBUG to edit binary files.
I remembered that I could use commands like
-l 100 0 0 1
-d
to load the boot sector from floppy A and inspect whether the boot sector was infected with any virus and if so, I would find a clean floppy disk and using DEBUG to write its boot sector to the disk that was infected.
And routinely, I would use the following commands to inspect the partition table of my harddrive to make sure that it was free from any infections:
mov ax, 0201
mov bx, 1000
mov cx, 0001
mov dx, 0080
int 13
int 3
-g 100
-d 1000
Remember this one?
jmp ffff:0000
I remembered that someone at my high school used to play the pranks by changing the very first few bytes on floppy disks to EA:00:00:FF and placed the disks in computers in the lab so that whenever someone turned on the computer, it would enter an infinite reboot cycle.
And when CIH stroke in the late nineties, my friends and I would use DEBUG to inspect the virus's code to see how the instructions could actually be used to cause real physical damage to the hardware.
After Windows came along, I still used DEBUG often. After all, deep inside Windows (up till Windows ME), there was MS-DOS and for years, user were allowed to operate in real mode if they so inclined to. With the advent of Windows 2000 and then later Windows XP people started to forget about DEBUG since the operating system became true 32bit and the DOS prompt became just an emulator. You could still view files and write assembly code within DEBUG, but it was in a protected environment and everything you do was pretty safe and you couldn't really do anything harmful to the hardware (of course, you could still overwrite sectors in floppy disks if you wanted to).
Ah, those were the good old days. Just like QBasic disappeared from later versions MS-DOS, DEBUG has gradually become obsolete. It remained in Windows Vista, but it is no where to be found in Windows 7. At last, Windows has shed one of its last vintage applications from the MS-DOS era.
Fond memories... (Score:2)
I cracked my first game using "debug" a long time ago... It was "Speedball II, Brutal Deluxe", which remains in the running for Best Video Game Title Ever.
FWIW, I didn't do anything with the crack. It was my own legal copy of the game. I just wanted to see if I could do it. One little NOP, and the whole call to the copy protection subroutine was canceled. Ha!
f 0000:0000 ffff ff (Score:2)
Please observe a moment of silence for the last command you'll ever type in debug...
f 0000:0000 ffff ff
Re: (Score:2)
This doesn't do much in Windows, by the way.
Who still uses it? (Score:2)
"Over the years"...yeah? not over all twenty eight of them, surely! When did you last use debug? I probably haven't used it since 1989 for hacking command names in command.com in MS-DOS 3.3.
Text editing in debug (Score:3, Informative)
We were at a trade show and needed to make a change to the file but edit, for some strange reason, was missing from the machine, so it was the only thing we had to make the edit.
After that I made sure I always had a floppy with key tools with me.
MS-DEBUG?? Don't you mean SCP-DEBUG from 1980? (Score:3, Informative)
Used it just a few weeks ago (Score:3, Informative)
Fixed some source code files that someone had mis-saved in Notepad as UTF-8, or such.
the files had a Unicode Byte-Order-Mark character which the compiler choked on. FEFF the Zero-width, non-breaking space. It's literally an invisible character, so the easiest way to verify/fix the problem is a hex editor, so I used the always-handy DEBUG.
Re:Article not quite right ... (Score:5, Informative)
Acutally, the debug command was removed in Windows Vista & Windows Server 2008.
Really? At least my Vista installation still has it.
Re: (Score:2)
Seconded. Just checked a Vista box installed here at the office. It was Vista Ultimate.
Does version make a difference?
Re:Article not quite right ... (Score:4, Informative)
Seconded. Just checked a Vista box installed here at the office. It was Vista Ultimate. Does version make a difference?
It's removed from 64 bit copies of Windows, including XP 64 bit.
Re:Article not quite right ... (Score:5, Insightful)
Seconded. Just checked a Vista box installed here at the office. It was Vista Ultimate.
Does version make a difference?
It's removed from 64 bit copies of Windows, including XP 64 bit.
Removed or they couldn't or wouldn't get it working?
Re:Article not quite right ... (Score:5, Informative)
Depends, is it still the same old 16-bit exe in the versions of Vista people are reporting it to be present? If so, probably "didn't bother to get it working". Many DOS utilities of that time were written in assembly, so getting it working in 64-bit would have basically consisted of rewriting it.
Re:Article not quite right ... (Score:5, Interesting)
Afaict debug is a 16 bit does tool for creating and debugging 16 bit dos apps. Since 64 bit windows doesn't support dos apps (or 16 bit windows apps for that matter) it wouldn't make much sense to include something that both is one and is a tool for working with them.
P.S. I find it amusing that wine on 64 bit linux can run 16 bit windows apps yet 64 bit windows can't.
Re:Article not quite right ... (Score:5, Informative)
Vista 64 users can always use dosbox.
Re: (Score:3, Funny)
Yes but Wine64 can't really run any 64-bit Windows apps and Wine has trouble with most Win32 apps. Being able to run 16-bit apps under Wine is more of a testament to how far behind it is.
Re: (Score:2, Interesting)
P.S. I find it amusing that wine on 64 bit linux can run 16 bit windows apps yet 64 bit windows can't.
Actually, I'd be interested in knowing how this works (assuming it's true). Does Wine do some sort of binary translation? To my knowledge 16-bit instructions aren't available in 64-bit mode, so it can't just be running it natively. Does it do that with all programs, or just 16-bit ones? Anyone know?
Re: (Score:3, Interesting)
Actually, I'd be interested in knowing how this works (assuming it's true)
It's most definately true
Actually finding out how wine does 16 bit code is trickier. I've found out from the documentation that it involves something called "winevdm.exe.so" but i dunno how that binary does it. I guess it would be possible to RTFS but I don't care enough to do that.
To my knowledge 16-bit instructions aren't available in 64-bit mode, so it can't just be running it natively
You can't do 16 bit real mode code under a 64 b
Re: (Score:2, Informative)
Re: (Score:2)
Re: (Score:2)
There was. But it got dropped to focus work on other things. I think the focus is again turning, however.
Re: (Score:2)
IIRC work has started on one but it isn't in a usable state yet.
One big question is what is the use for a 64-bit wine? What apps are there that have a 64-bit windows version but not a 64-bit linux version?
Re: (Score:2)
What apps are there that have a 64-bit windows version but not a 64-bit linux version?
Photoshop
Re: (Score:3, Informative)
debian:/home/plugwash# file /c/windows/system32/debug.exe /c/windows/system32/debug.exe: MS-DOS executable, MZ for MS-DOS
debian:/home/plugwash#
(the windows install is XP pro, i'm booted into linux at the moment)
Seems pretty clear to me, it's a DOS executable and it's well documented that 64 bit windows cannot run dos executables.
Re:Article not quite right ... (Score:5, Funny)
Shouldn't the headline read "R.I.P. MS-DEBUG 1981 - 2010" or " - 2011"? ( ...do I hear 2012?)
-a 100 (Score:5, Funny)
-a 100
jmp 100
w
x
?
?
?
quit
end
crap
sit
vi?
Re:-a 100 (Score:4, Informative)
Q
Filter error: You can type more than that for your comment.
Re: (Score:2)
Maybe he wanted to write a file called '!'?
Re: (Score:2)
Re: (Score:2, Informative)
Re: (Score:3, Informative)
Re: (Score:3, Informative)
As pointed out already, it's only absent from x64 editions of Windows (and it has been so for as long as such existed, starting with 2003 and XP). This is because debug.exe is a 16-bit DOS program, and 64-bit Windows versions do not support 16-bit binaries.
32-bit Windows 7 still has all the old DOS goodies - not just debug.exe, but also edit.com and even edlin.exe. Some things never die, apparently.
Re: (Score:3, Insightful)
From the article summary:
Vista is not Windows 7 so.... yes we'd expect the debug command in Vista.
Re: (Score:2)
ehm, I checked on my netbook running windows 7 RC (32 bit) and the debug command is still there.
Re: (Score:2)
At least, not ostensibly.
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
All those Simoleans I created with debug.exe...
Re: (Score:2)