So I am learning Assembly Language and Peter Norton’s Assembly Language Book for the IBM PC was recommend to me. I got it on amazon for about $5 shipped. The first section of the book is on “Machine Language” were it has you use a program called DEBUG.COM to poke around in the registers and do hex math.
I did some research on where I could get a hold of this program and it seems it is included with DOS and is also included in 32 bit versions of Windows as debug.exe.
Well I the last two versions of Windows I have run (Windows 7 and Windows 8) were both 64 bit and I cannot find debug.exe in Windows 8.
You will need two free software packages. First you will need FreeDOS as it comes with a clone of the DEBUG.COM program the book is talking about. This will not run in Windows 8, I tried. So you need to either install and run FreeDOS in a Virtual Machine or the easier way is to get DOSBox. This is what I did and I got it all working in about 5 minutes.
Download DOSBox
Go to dosbox.com, click on “Downloads” and click “Download Now”.
Download FreeDOS
Go to www.freedos.org, click on “Download FreeDOS”, then on the green “fd11src.iso” button or a newer version if it is available.
DOSBox “Drive” Folder
Create folder for DOSBox to mount as its C drive. In this example I will use “C:\DosBoxDrive”
Get DEBUG.COM
Mount FreeDOS ISO by double-clicking on it
Navigate into FREEDOS/PACKAGES/BASE and find DEBUGX.ZIP.
Open DEBUGX.ZIP by double-clicking on it.
Navigate into “bin” and you will see the Holy Grail DEBUG.COM!
Copy DEBUG.COM to C:\DosBoxDrive
Install DOSBox
Launch the DOSBox installer. Click “Next” on all screens until it finishes, unless you really want to change something. When done click “Close”.
Launch DOSBox and Use Debug
Type “mount c c:\dosboxdrive“ and press Enter. This will make the folder you created earlier as DOSBox’s C drive.
Switch to this drive by typing “c:“ and pressing Enter.
Take a look at the contents of this drive by typing “dir“ and pressing Enter. You will see DEBUG.COM in there. Slick huh?
Now launch the Debug program by typing “debug” or “debug.com” and pressing Enter. You know it is ready when you have the dash “-“ right before your blinking cursor. From here just follow the instructions in the book.
Lets try an early example from the book, doing Hexarithmetic on 2 and 3. At the dash prompt type “H 2 3“ and press Enter. It is case-insensitive so “h 2 3“ will work too.
Now you should be able to do all the examples from the first section of the book. Exit Debug by typing Q and pressing Enter. You can just close DOSBox at any time. To start back up again just launch DOSBox, mount the C drive again, switch to it and enjoy!