Lab1 Getting Started (DEBUG)
Lab1 Getting Started (DEBUG)
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.
II. EQUIPMENT:
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.
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.
-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
-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