EEE 3216 Experiment 01
EEE 3216 Experiment 01
Experiment No. 01
Name of the Experiment: Executing simple instructions in the Trainer Board
A. Objectives
The objectives of this experiment are to
To learn the procedure of loading program in RAM of MDA-8086 in “Machine Code” mode.
To load the program to MDA-8086, execute the program in single step mode and verify the result.
B. Theory
In this experiment we shall execute a simple assembly language program after loading it to
MDA-8086 Kit. This program consists of one addition, one subtraction, one increment and decrement
instructions. To load the program, we shall save the machine code of different instructions to the
respective memory (RAM) location of our microprocessor kit. We shall observe different registers of
8086 to verify results, after execution of each instruction. Here is our program:
CODE SEGMENT
ADD AX, DX
SUB AX, BX
INC DX
DEC BX
HLT
CODE ENDS
END
C. Apparatus Required
1. Write the above program in notepad and save the file as “filename.asm”. Place this file
in the folder where “masm.exe” exists.
2. Go to command prompt and execute “masm.exe”. You will see the following
4. Open the file “filename.lst” using notepad. Here you will find respective machine code for
each instruction.
7. Write the machine codes in the appropriate memory address according the following table:
8. Execute this program in single step using “STP”. Observe the register contents after
execution of each instruction and note down in the data table. Perform theoretical
calculations and verify results.
2
E. Experimental Table:
Set Flag
Instruction / Mnemonics AX BX DX Remarks
Bit(s)
Initial Status
MOV AX, 805EH
MOV DX, 0540H
ADD AX, DX
MOV BX, 0050H
SUB AX, BX
INC DX
DEC BX
HLT
F. Report:
Discuss the effect of each instruction/ mnemonics that is used in this program.
G. References:
1. User’s manual of MDA-8086 microprocessor kit
2. “Assembly Language Programming and Organization of the IBM PC”, Ytha Yu and
Charles Marut, Mitchell McGraw-Hill.