CS 301 Fall 2001 – Chapter 3

Download Report

Transcript CS 301 Fall 2001 – Chapter 3

CS 301 Fall 2001 – Chapter 3
Slides by Prof. Hartman, following
“IBM PC Assembly Language
Programming” by Peter Abel
7/20/2015
1
Using DEBUG
Tutorial on the web.
 Appendix C in the book.
 DEBUG is not case sensitive.
 All numbers are hexadecimal.
 Spaces are used to separate parameters.
 Segments and offsets are specified as
segment::offset.

7/20/2015
2
DEBUG Commands










A
C
D
E
F
G
H
I
L
M
7/20/2015
Assemble instructions
Compare two areas of memory
Display contents of memory
Enter data into memory
Fill memory
Run the executable in memory. (Go)
Perform hexadecimal arithmetic
Input and display one byte from a port.
Load a file or disk sectors into memory.
Move (or copy) memory
3
DEBUG Commands 2










N
O
P
Q
R
S
T
U
W
?
7/20/2015
Name a program
Output a byte to a port
Proceed (execute CALL, LOOP, INT or REP)
Quit
Display the contents of one or more registers
Search memory
Trace the execution of one instruction
Unassemble (disassemble) machine code.
Write a (named, .COM) file to disk
Display help screen
4
DEBUG Examples

Work through examples in the text: pages
36—48.
7/20/2015
5