{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

EE3751 Class Notes

EE3751 Class Notes - Debug A program included with DOS that...

Info icon This preview shows pages 1–12. Sign up to view the full content.

View Full Document Right Arrow Icon
Debug A program included with DOS that allows a programmer to monitor the execution of a program for debugging purposes. Using Debug: Enter Debug A:>DEBUG<enter> - Exit Debug -Q<enter> A:>
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Debug Displaying registers -R<enter> AX=0000 BX=0000 CX=0000 DX=0000 SP=FFEE BP=0000 SI=0000 DI=0000 DS=0D00 ES=0D00 SS=0D00 CS=0D00 IP=0100 NV UP DI PL NZ NA PO NC 0D00:0100 B80100 MOV AX,0001 Modifying registers -R CX:<enter> CX 0000 :0009<enter> - R CX<enter> CX 0009 :<enter> -
Image of page 2
Debug Assemble command – allows the programmer to enter assembly language instructions into memory. -A 100 <enter> 0B3C:0100 MOV AX,1 <enter> 0B3C:0103 MOV BX,2 <enter> 0B3C:0106 ADD AX,BX <enter> 0B3C:0108 INT 3 <enter> 0B3C:0109 <enter> -
Image of page 3

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Debug Unassemble command - allows the programmer to display the machine code in memory along with their assembly language instructions. -U 100 L1 <enter> 0B3C:0100 B80100 MOV AX,1 -U 100 103 0B3C:0100 B80100 MOV AX,1 0B3C:0103 BB0200 MOV BX,2 -
Image of page 4
Debug Go command – allows the programmer to execute instructions found between two given addresses. -G=100 108<enter> AX=0004 BX=0003 CX=0000 DX=0000 SP=FFEE BP=0000 SI=0000 DI=0000 DS=0B3C ES=0B3C SS=0B3C CS=0B3C IP=0108 NV UP EI PL NZ NA PO NC 0B3C:0108 CC INT 3
Image of page 5

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Debug Trace command - allows the programmer to trace through the execution of a program one or more instructions at a time to verify the effect the program has on registers and/or data. -T=100 2<enter> AX=0001 BX=0000 CX=0000 DX=0000 SP=FFEE BP=0000 SI=0000 DI=0000 DS=0B3C ES=0B3C SS=0B3C CS=0B3C IP=0103 NV UP EI PL NZ NA PO NC 0B3C:0103 BB0200 MOV BX,0002 AX=0001 BX=0003 CX=0000 DX=0000 SP=FFEE BP=0000 SI=0000 DI=0000 DS=0B3C ES=0B3C SS=0B3C CS=0B3C IP=0106 NV UP EI PL NZ NA PO NC 0B3C:0106 01D8 ADD AX,BX -
Image of page 6
Debug Dump command (D) - allows the programmer to examine the contents of memory. Fill command (F) - allows the programmer to fill memory with data. Enter command (E) - allows the programmer to modify memory content. -F 100 LF 00<enter> -D 100 LF 0B3C:0100 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ……………. -F 110 11F 20 -D 100 11F 0B3C:0100 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ……………. 0B3C:0110 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 -F 120 LF 20 -E 120 ‘John Smith’ -D 120 LF 0B3C:0120 4A 6F 68 6E 20 53 6E 69 74 68 20 20 20 20 20 20 John Smith -
Image of page 7

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Debug Loading programs from a specific file requires two commands, the Name command, N, and the Load command, L. -N A:\PROG1.EXE -L Loading programs upon entering Debug. C:\DEBUG A:\PROG1.EXE
Image of page 8
Debug Links to useful websites: DEBUG/ASSEMBLY TUTORIAL by Fran Golden http://www.datainstitute.com/deb ug1.htm Rough Guide to Assembly http://www.geocities.com/riskyfrie nds/prog.html Paul Hsieh’s x86 Assembly Language Page http://www.azillionmonkeys.com/ qed/asm.html
Image of page 9

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Assembly Language Program Series of statements which are either assembly language instructions or directives. Instructions are statements like ADD AX,BX which are translated into machine code. Directives or pseudo- instructions are statements used by the programmer to direct the assembler on how to proceed in the assembly process.
Image of page 10
Assembly Language Program Statement format: [label:] mnemonic [operands][;comments] Label: Cannot exceed 31 characters.
Image of page 11

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 12
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}