

A Guide to Debug.exe - infinity
http://thestarman.pcministry.com/asm/debug/debug.htm

======
TheCraiggers
Reminds me about how I nearly got kicked out of highschool for changing the
background color of sol.exe.

Back in my HS days, the "computer class" teacher (in quotes because it wasn't
a computer class at all, rather a typing class) used to walk around and say "I
don't want to see any green screens". Green, of course, being the background
color of the built-in solitaire card game back in Windows 3.11 days.

I took a screenshot as a bmp, and found the hex value for the background
color. Then I fired up debug, having nearly no idea what I was doing, searched
for that hex value, found it, and then changed it to a nice mauve color.
Thought it would be funny, maybe even praise-worthy.

Instead, the teacher lost his shit. These computers were "locked down" by
basically just putting all the admin-type shortcuts into a password protected
program group. But File->Run was still there, and it had no problem firing up
COMMAND.COM. I didn't think it would be a big deal, but of course it was
completely blown out of proportion by the teacher, who didn't exactly like my
attitude.

I still dislike that man.

~~~
makmanalp
It does sound like you were being a bit of a smartass :-)

But at that point, the teacher could have dealt with that two ways: way one
would be doing exactly what he did, and way two would be to ask you how you
did it, then find you a cool project to channel that curiosity into.

It's a sad thing when a teacher would rather beat someone into submission
instead of give them a chance to grow.

~~~
Someone1234
It is worth keeping in mind, that in particular in the 1990s, many "computer"
and "IT" teachers were just other types of teachers who happened to have been
roped into it.

So to say they knew nothing about computing would be an understatement. Many
of them literally only knew what was in the course material and nothing else.
Yet they were the school's "expert."

If a kid broke a computer, everyone was screwed. The teacher couldn't fix it.
And they would have to get in an outside company, like RM, or HP to fix it.
That could take weeks.

This should go some way of explaining the mentality of these teachers. They
were always living on borrowed time and knew they didn't know anything. A
single bad incident would reveal all. That's why you get so many stories like
this, it is also why it was unlikely that a teacher would be able to create a
fun project for such a student (because they didn't know anything!).

Things have changed a lot since then. Not only are teachers technically
better, but security is better, and technical support infrastructure is better
defined (i.e. schools actually have an "IT guy" even if they're working for a
third party).

------
nbaksalyar
It's interesting that you can write relatively complete programs with
Debug.exe assembler.

This link made me remember my weird experiment from 2009 to write a NES Battle
City [1] clone with debug.exe assembler [2]. Of course it wasn't completed,
but nevertheless, it even switches to a graphic mode and draws a single sprite
on the screen and takes input from the keyboard. :)

The demo [3] still should be working in DosBox.

[1]
[https://en.wikipedia.org/wiki/Battle_City_(video_game)](https://en.wikipedia.org/wiki/Battle_City_\(video_game\))

[2]
[https://code.google.com/p/asmbattlecity/source/browse/](https://code.google.com/p/asmbattlecity/source/browse/)

[3]
[https://code.google.com/p/asmbattlecity/downloads/detail?nam...](https://code.google.com/p/asmbattlecity/downloads/detail?name=tanks_demo_02.zip)

------
chris_overseas
This article really brought back some great memories for me. I learned about
computers as a kid back in the early 80s on an MS-DOS clone PC. The only
manuals I had was one listing the various MS-DOS commands (sadly, excluding
anything about debug.exe though) and one that was a command reference for
gwbasic.exe [1].

I spent many hours trying to write games in gw-basic but quickly realised that
the performance was atrocious, to say the least. Eventually I stumbled across
a magazine that had a two-page article about debug.exe and it was my gateway
to a whole new hidden world. I went on to learn 8086 assembly with debug.exe
by trial and error and from stepping through other programs. Eventually I
figured out I could write little 8086 assembly routines in debug.exe myself,
take the sequence of bytes that made up that routine, declare them as a DATA
statement in a BASIC program and then just make call that DATA line to run the
machine code directly [2]. It wasn't until many months later I finally managed
to get my hands on some compilers and assemblers (Borland Turbo Pascal and
Turbo Assembler being my favourites back then) which of course made my life a
whole lot easier! I continued to use debug.exe for many years though,
primarily for reverse engineering.

I've just managed to dig up an obfuscated "Hello World" batch file I wrote
many years ago that makes use of debug.exe, see [3] below (If you actually
want to run it you'll probably need an MS-DOS emulator [4][5] or an older
version of Windows that still has debug.exe).

[1] [http://en.wikipedia.org/wiki/GW-BASIC](http://en.wikipedia.org/wiki/GW-
BASIC)

[2]
[http://www.antonis.de/qbebooks/gwbasman/appendix%20d.html](http://www.antonis.de/qbebooks/gwbasman/appendix%20d.html)

[3]
[http://www.redyeti.net/extra/hello.bat](http://www.redyeti.net/extra/hello.bat)

[4] [https://jamesfriend.com.au/pce-js/ibmpc-
games/](https://jamesfriend.com.au/pce-js/ibmpc-games/)

[5] [http://www.dosbox.com/](http://www.dosbox.com/)

------
whoopdedo
One of the more useful things that was done with debug.exe was a binary-to-
ascii converter for sending files in email or usenet and the recipient didn't
need any extra tools. I think the program was called "xxdebug" after xxencode
which was a descendent of uudecode. But Google doesn't help, so either my
memory is wrong or the internet has forgotten.

I'm positive I have it on an archived disk somewhere. If I were inclined to
resurrect it.

------
Zardoz84
Another relic of old times is the font installer embed on Windows. Since
Windows 3.1 to Windows XP has the exact same program! You can check that it's
keeps using the old GUI to navigate across the filsesystem, not showing the
"Destop" false root.

On Windows Vista and forward was replaced by something more modern.

------
chrisbennet
The smallest program I ever wrote, I wrote using debug.exe. It was 7 bytes
long. I think it reset the graphics card. This was around 1991.

