Microprocessors / DEBUG Lab

profilebeoto01
debughelp2.doc

ELEC202 Microprocesors

Running DEBUG in Microsoft Vista, Windows 7, and Windows 8

Microsoft has chosen to remove the DEBUG utility from several Windows 64-bit operating systems.

However, it is still possible to run DEBUG after following a simple process.

First, you need to install a utility program called DOSBox.

Second, you install a copy of DEBUG that runs inside DOSBox.

Installation

1. Download the ZIP file DEBUGFIX and open it. It contains two files as shown:

image1.png

When you extract the files, just choose C:\ as the destination folder and both files will automatically be saved into the C:\DEBUG folder.

2. Run the DOSBox0.74-win32-installer.exe program. It will install DOSBox on your Windows Vista , 7, or 8 computer.

3. Run the DOSBox utility by double-clicking its desktop icon:

image2.png

You will see the following screen:

image3.png

4. Mount the DEBUG folder by typing mount c c:\debug and pressing Enter.

Important Note: If you get an error and you typed the mount c c:\debug command in correctly, you may not have extracted the ZIP files correctly. For your instructor to be able to assist you, you will need to do a screen shot showing the files in the DEBUG folder.

FYI, there is a tutorial on the DosBox website if you want to take a deeper look. Visit www.dosbox.com for more information.

image4.png

5. Switch to drive C by typing c: and pressing Enter:

image5.png

6. Run DEBUG by typing debug and pressing Enter. Here you can see the results of DEBUG’s r command:

image6.png

Now, just type commands into DEBUG one by one.

For example, here is the short program from Module 2 Lab 2A:

a

mov ax,0

mov bx,1234

mov cx,5678

mov dx,9abc

and ax,bx

or ax,cx

xor ax,dx

not ax

r

t 8

q

Type each line as shown and press Enter at the end of each line. The blank line after the not ax instruction is needed to get DEBUG out of the “a” command.

Here is the DOSBox DEBUG session using these commands:

image7.png

Now just the t 8 and q commands are left:

image8.png

You can always grab a screen shot of the DOSBox DEBUG window by pressing Alt Print Screen and then pasting from the clipboard into your lab document.

Here are all the DEBUG programs from the various labs for your reference:

First program from Module 3 Lab 3A

a

mov dx,1

mov ax,6b48

mov bx,00ba

div bx

mov bl,3c

div bl

r

t 6

q

Second program from Module 3 Lab 3A:

a 200

db 5

db 8

db 4

db 7

db 6

a 100

mov si,200

mov al,[si]

mov ah,0

mov bh,0

mov bl,[si+1]

add ax,bx

mov bl,[si+2]

add ax,bx

mov bl,[si+3]

add ax,bx

mov bl,[si+4]

add ax,bx

mov bl,5

div bl

r

t 0e

q

Third program from Module 3 Lab 3A:

a

mov al,20

cmp al,10

cmp al,20

r

t 3

q

Fourth program from Module 3 Lab 3A:

a

mov al,90

cmp al,80

cmp al,a0

r

t 3

q

Notes:

· In all of these programs, remember that the blank line is needed to get out of the “a” command and be able to begin entering other DEBUG commands, such as “r” or “t” or whatever.

· Use Alt Print Screen to grab a screenshot of the DEBUG command window so you can paste your results into your lab writeup. You may want to do this before using the “q” command to quit DEBUG.

PAGE

2