0% found this document useful (0 votes)
3 views

Lab1 Getting Started (DEBUG)

Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

Lab1 Getting Started (DEBUG)

Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

CPEARC – COMP.

ORGANIZATION AND ARCHITECTURE


LABORATORY EXERCISES

Name: ___________________________________ Course: ________ Date: ___________


Yr. & Sec.: ___________ Lab. No.: 1 Instructor: _________________________

Exercise 1 – GETTING STARTED

I. OBJECTIVE:

To be familiar with some commands by solving some simple problems In this laboratory,
we will use DEBUG program and learn how to:

1. Examine and modify the contents of the 8086’s internal register, and dedicated
parts of the memory.
2. Assemble instructions into memory of the PC system; TRACE each instruction
to determine the operation it performs.
3. Load the machine code of an assembled program from a file, run the program,
and observe the operation of a program.

Note that when typing commands and parameters you use any combinations of uppercase
and lowercase letters.

Check off each step as it is completed.

II. EQUIPMENT:

 PC with Windows OS installed with DOSBox 0.74


 8086 Assembly Files

III. PROCEDURE

1. Obtain a copy the 8086 folder from your instructor. Paste the folder in c:\. The location of
the folder is c:\8086.
2. Search and run DOSBox 0.74. Type mount c c:\8086.

3. Go to the c directory. Type c:.

CPEARC – COMP. ORGANIZATION AND ARCHITECTURE Page 1 of 2


by: Engr. Eddie G. Santillan, Jr.
4. Execute the debugger with the command:

c:\ > DEBUG

You will get the DEBUG prompt of a hyphen (-). If you run into problems, you can enter the
command ‘Q’ (Quit) any time you have the DEBUG prompt.

5. Using the R command to look at the registers.

-R

Note the contents of AX, BX, CX and DX should be all zero, and IP should be start at 0100.

6. Assemble the instruction MOV SI, [0200] into memory at address CS:0100 with the
following command:

-A 0100
XXXX:0100 MOV SI, [0200]

7. Initialize the word of memory starting at DS:0200 with the value 1234H and then verify
with a DUMP command that the contents of memory have been updated.

-E 0200
XXXX:0200 XX.12 press space bar XX.34
//must type 12 followed by space bar and type 34 the press enter
-D 0200

8. Clear the SI register and verify by redisplaying its contents.

-RSI
SI XXXX
:0000

9. Initialize the IP register with the value 0100H and verify by redisplaying its contents.

-RIP
IP XXXX
:0100

10. Execute the instruction with a TRACE command. Describe the operation performed by
each instructions.

-T

CPEARC – COMP. ORGANIZATION AND ARCHITECTURE Page 2 of 2


by: Engr. Eddie G. Santillan, Jr.

You might also like