0% found this document useful (0 votes)
11 views7 pages

Mastering DEBUG Commands and Functions

The third document covers using the DEBUG "FILL" command to populate a range of memory locations with specified values, including using attributes to change colors on the screen. Students are
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views7 pages

Mastering DEBUG Commands and Functions

The third document covers using the DEBUG "FILL" command to populate a range of memory locations with specified values, including using attributes to change colors on the screen. Students are
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

LABORATORY ACTIVITY 01

OBJECTIVE:
 Be able to know and use the UG commands
 Be able to list down all commands under DEBUG
BACKGROUND/PREPARATION:
The laboratory activity needs a typical desktop PC with command prompt. It is assumed that
students are familiar with keying in system commands.
DEBUG is a utility can be extremely useful, when used correctly. It is almost a must for Assembler
Language programmers, and can also provide an insight into the operation of the machine at the bit level.
It has several nice features, including the ability to display and change any of the registers in the IBMPC,
start and stop program execution at any time, change the program, and look at the output. DEBUG works
at the machine code level, but it does also have the ability to disassemble machine code, and assemble
instructions directly into machine code.
INSTRUCTION:
1. In the command prompt, type the word DEBUG.
2. You will get the DEBUG prompt of a hyphen(-)
3. Then type ? to list all the commands you can see.
4. What are the debug commands listed?

5. If you do have problems, you can enter the command Q (Quit) any time you have the DEBUG prompt (-).
This should return you to the DOS prompt.
REFLECTION: What can you say with DEBUG? It is very easy from the start because we have the guides
and identifying the different commands that are in listed from the prompt.
LABORATORY ACTIVITY 02
BUG-REGISTER/HEXA

OBJECTIVES:
 Be able to view the contents of the registers and memory locations

 Be able to perform hexadecimal arithmetic

BACKGROUND/PREPARATION: The laboratory activity needs a typical desktop PC with command prompt. It is
assumed that students are familiar with keying in system commands.

INSTRUCTION:
1. Let's start with the first command. Type R

2. What was the displayed output?

AX= 0000 BX= 0000 CX= 0000 DX= 0000 SP= 00FD BP= 0000 SI= 0000 DI= 0000

DS= 073F ES= 073F SS= 073F CS= 073F IP= 0100 MV UP EI PL NZ NA P0 NC

073F: 0100 0000 ADD [BX+SI], AL DS: DEA9= 00

3. Type R AX and then 234F

4. Type R

5. What is now the content of AX? 0234

6. The default content of BX is 0000. What will be the command to change the content of BX with DEA9?

-R BX

BX 0000

:DEA9

7. The default content of CX is 0000. What will be the command to change the content of CX with BAC2?

-R CX

CX 0000

:BAC2
8. The default content of DX is 0000. What will be the command to change the content of with 2FE6?

-R DX

DX 0000 :2FE6

9. The default content of IP is 0100. What be the command to change the content of with 1234?

-R IP

IP 0100

:0100

10. Now let's try another command. Type H F69 87A

11. It should return two values, what were the returned values? 1AE3 03EF, 569C 0BBE

12. Try also H B 12D A56F

13. What were the returned values? 569C 0BBE

14. Type Q, to exit from debug

REFLECTION:
What are the values you learned from this activity? We learned how to command, change the
contents inside of the registers, and identifying how to return values.
LABORATORY ACTIVITY 02
DEBUG FILL
OBJECTIVES:
 Be able to use DEBUG Fill command

 Be able to understand the ASCII code

 Be able to understand the attribute property of the video area

BACKGROUND/PREPARATION:
The laboratory activity needs a typical desktop PC with command prompt. The fill command is used to fill a range of
memory locations with values in a list. The default register is DS. You may code the command with a length or a
range as shown in the examples below.

INSTRUCTION:
1. In the command prompt, type F 210 L19 'help!'

2. What was the displayed output?

3. Try typing F 210 229 'HELP!’

4. What was the displayed output


5. Try F B800:0 LFAO 03 16

6. What was the displayed output?

7. Try F B800:0 L032 04 15

8. What was the displayed output?


BACKGROUND FOREGROUND BL R G B I R G B

hexa

Black Blue 0 0 0 0 0 0 0 1

Blue Red 0 0 0 1 0 1 0 0

Green Cyan 0 0 1 0 0 0 1 1

White Light 0 1 1 1 1 1 0 1

Magenta

Black White 0 0 0 0 0 1 1 1

Here are some of typical attributes where BL means blinking and I means Intensify:

9. Try to fill half the screen with smiley (02h) using a black background and a green foreground

10. What is the command?

11. Try to fill the top three rows with asterisk using a yellow background and a blue foreground
12. What is the command?

13. Try to fill the top row with capital letter Z using a white background and a red foreground

14. What is the command?

15. Type Q, to exit from debug

REFLECTION: What part from this activity you understood most? Why? We understand the different typical
attributes and convertions from hexadecimal that giving the values to make colors.

Members: Jan Marc Coloma Maynard Pagauitan

Francis Cesar S. Gabriel ll

You might also like