0% found this document useful (0 votes)
149 views10 pages

8086 Debug Exmp

This document provides instructions for using the DEBUG program to assemble and run assembly code. It demonstrates how to mount a DOS folder, assemble code starting at address 0130, insert labels and jumps, edit data at specific addresses, single step through code execution showing register and flag changes, and display memory locations after program completion. The DEBUG program allows stepping through and debugging assembly code.

Uploaded by

Ishansi Agrawal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
149 views10 pages

8086 Debug Exmp

This document provides instructions for using the DEBUG program to assemble and run assembly code. It demonstrates how to mount a DOS folder, assemble code starting at address 0130, insert labels and jumps, edit data at specific addresses, single step through code execution showing register and flag changes, and display memory locations after program completion. The DEBUG program allows stepping through and debugging assembly code.

Uploaded by

Ishansi Agrawal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

DEBUG example

Start DEBUG

Mount DOS folder as drive c ; switch to drive C


DEBUG example

Start DEBUG prg

DEBUG prompt _
DEBUG example
Start assembly code at 0130 - a130

Type mnemonics
DEBUG example
As label X2 is not known ,type ff (short jump +/-128)

The address of X2 is 013D,


DEBUG example
label X1 is known , type 0137 (IP relative)

End of programm either HLT or DOS service


DEBUG example
Assemble at 0139 to edit label X2 -a139

Now back to DEBUG prompt


DEBUG example
UNAssemble code from 0130 -u130

Edit Data (insert data) at address 180 -e180


Press Enter, shows old byte, enter desired bye,Enter
DEBUG example
Edit data , to stop data entry press Enter

Execute in single step ; set IP to 130 -t=130


Shows registers, flags after execution of first
instruction,Also shows next instruction to be executed
DEBUG example
Right side shows memory data next instruction refers

CMP instruction and change of FLAG NC to CY


DEBUG example
Loop condition fails. Change of Flag NZ to ZR

Programme Halts. Display memory 190

You might also like