Beruflich Dokumente
Kultur Dokumente
BASIC INFORMATION
DOS DEBUG.COM
DOS offer a debugging utility as one of its internal commands. The DEBUG program can
be use to:
• Provide a controlled testing environment so you can monitor and control the
execution of program.
• Load, alter or display any file
• Execute object files.
• Object files are executable programs in machine language format.
DEBUG_COMMMANDS
• The prompt from DEBUG program is a hyphen ( - )
1.5 Materials/Equipment
Figure 1. Title
1.7 Procedure/s
1. Invoke DEBUG from the PC’s RAMDRIVE. Write down the command you use.
DEBUG
2. Investigate the register using the R Command. The R (register) has common function.
Function 1: R
It display the hexadecimal of all the registers, plus the alphabetic flag
settings and the next instruction to be executed.
General-Purpose Registers
AX=004C
BX=0000
CX=0000
DX=0000
SP=00FD
BP=0000
SI=0000
DI=0000
IP=0100
c. Segment Registers
DS=073F
ES=073F
SS=073F
CS=073F
3. Change the contents of the CX register to 1352. Write down the complete DEBUG
command that you use.
-R CX
:1352
To write a file, it must first be initialized with the N command. The N command
initialized a file name in the memory before using the load or write command.
Place the number of bytes to be written in BX and CX ( BX contains the high 16 bits,
and CX contains the low 16 bits. To change the contents of registers BX and CX with
the size of the code you enter. The W ( write ) command writes a block of memory to a
file.
g ( go ) command execute the
program.
-r cx
cx 0000
:10
-w
2. Create a program to display the given output below, write down and compile the
required program that will provide the expected sample output using sam1.com as the
filename.
b. A
ASSEMBLE
c. N
NAME
ACTIVITY 1: DEBUG FAMILIARIZATION
19
d. W
WRITE
e. T
TRACE
B- <LF>
_____66_______ _____10_____________
j- <CR>
_____106_______ _______13___________
<SP> (space) - 95
a- ______97______
d-
______100______ .(dot) - 46
9. Explain the method you use in determining the number of bytes to be saved for a
program.
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
1.8.4 Conclusion/s
I conclude that you need to familiarize yourself with the common debug commands
because if you do not, how about the next activity which will be surely use many
complex commands with combination. I also conclude that constructing an assembly
language is not that easy because you need to consider a lot of things such as the ASCII
and the functions of commands especially when you use it because it is not the simply
putting command there and you have the assembly, you need to understand what you are
doing.
Criteria Grade
Total Score