Sunteți pe pagina 1din 8

COMPUTER ENGINEERING DEPARTMENT

Computer Systems Organization and Architecture Manual

ACTIVITY 1: DEBUG FAMILIARIZATION

1.1 Program Outcomes (POs) Addressed by the Activity


a. ability to design and conduct experiments, as well as to analyze and interpret data
b. ability to identify, formulate, and solve engineering problems
c. ability to use techniques, skills, and modern engineering tools necessary for
engineering practice.
d. knowledge and understanding of engineering and management principles as a member
and leader in a team, to manage projects and in multidisciplinary environments

1.2 Activity’s Intended Learning Outcomes (AILOs)


At the end of this activity, the student shall be able to:
a. Identify the different Debug commands.
b. Apply the different Debug.exe commands.
c. Develop a code in Debug exe.

1.3 Objectives of the Activity


The objectives of this activity are to:
a. To familiarize students in using DEBUG commands.
b. To investigate the 8088 and familiarized with their functions.
c. To be able to construct an assembly language program using DEBUG.

1.4 Principle of the Activity

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 ( - )
• A command is a single letter, usually followed by one or more parameters,
• Commands become effective only after you press the ENTER KEY.

ACTIVITY 1: DEBUG FAMILIARIZATION 1


• Commands and parameters can be entered in uppercase or lowercase, or a
combination of both.
• Delimiters may separate commands and parameters.

1.5 Materials/Equipment

1 unit Personal Computer


DOS / Command Prompt
Storage unit

1.6 Circuit Diagrams / Figures / Source Codes (if Applicable)

Figure 1. Title

1.7 Procedure/s

1. Invoke DEBUG from the PC’s RAMDRIVE. Write down the command you use.

________________________________________________________________.

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.

Function 2: R < register name>


Display the hexadecimal contents of a single register with the option of
changing the contents. To display the contents of a single register ( ie., AX) enter:
- R AX
AX 0000
:_

Change the contents of the AX register by entering “L” character hexadecimal


value.

ACTIVITY 1: DEBUG FAMILIARIZATION 2


Use the DEBUG R command to display the contents of the registers. What are the
contents of the following registers?

General-Purpose Registers

________________________________________________________________________

________________________________________________________________________

________________________________________________________________________

________________________________________________________________________

b. Pointer and Index Registers

________________________________________________________________________

________________________________________________________________________

________________________________________________________________________

________________________________________________________________________

c. Segment Registers

________________________________________________________________________

________________________________________________________________________

________________________________________________________________________

________________________________________________________________________

ACTIVITY 1: DEBUG FAMILIARIZATION 3


3. Change the contents of the CX register to 1352. Write down the complete DEBUG
command that you use.

___________________________________________________________________

4. Load DEBUG enter assembly language program using A command. The A (


assembler ) command lets you enter mnemonic code assembly language instructions.

Format : A < address >


Address is assume to be an off set from the address in CS, unless another
segment value is given.
Assemble the following code into memory location 1234:0100

1234:0100 mov ah,2


1234:0102 mov dl,41
1234:0104 int 21h
1234:0106 mov dl,43
1234:0108 int 21h
1234:010a mov dl,45
1234:010c int 21h
1234:010e int 20h
1234:0110

Save the program into disk with filename sam1.com

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.

Format : N [drive] [filename] . [extension]

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

writing 00010 bytes


-q

ACTIVITY 1: DEBUG FAMILIARIZATION 4


5. See the contents of DRIVE (H:\CPO101L>dir).

a. Is the file sam1.com present? _____________________________

b. How many bytes does the file consume? ______________________

6. Execute the program. What is the output? _____________________________

1.8 Activity Report

Section: Date Performed:


Course Code: Date Submitted:
Course Title:
Instructor:
Group No.: Activity No.:

Group Members: Signature:


1.
2.
3.
4.
5.

1.8.1 Data and Results


1. Given the sample output coming from your instructor, write down and compile the
required program that will provide the expected sample output using expt1.com as
the filename.

2. Encode the program.

3. Ask your instructor to check your work

4. Save the program to your data disk.

ACTIVITY 1: DEBUG FAMILIARIZATION 5


5. What are the purposes of the following DEBUG commands?
a. R

b. A

c. N

d. W

e. T

6. What number system does DEBUG uses? __________________________________

7. Write the hexadecimal ASCII value for the following characters.

B - ____________ <LF> - __________________

j - ____________ <CR> - __________________

a- ____________ <SP> (space) - ____________

d - ____________ .(dot) - ___________________

ACTIVITY 1: DEBUG FAMILIARIZATION 6


8. Explain the method you use in determining the number of bytes to be saved for a
program.

1.8.2 Calculations

1.8.3 Observations (if applicable)

__________________________________________________________________

__________________________________________________________________

__________________________________________________________________

__________________________________________________________________

1.8.4 Conclusion/s

__________________________________________________________________

__________________________________________________________________

__________________________________________________________________

ACTIVITY 1: DEBUG FAMILIARIZATION 7


1.8.5 Rating (include Rubric)

Format &
Presentation (5% : ________
Timeliness (20%) : ________
Correctness (15% ) : ________
Summary &
Conclusion (20%) : ________
Machine Code (40%) : ________

ACTIVITY 1: DEBUG FAMILIARIZATION 8

S-ar putea să vă placă și