0% found this document useful (0 votes)
36 views3 pages

EEE 3216 Experiment 01

Microprocessor Labsheet
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)
36 views3 pages

EEE 3216 Experiment 01

Microprocessor Labsheet
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
You are on page 1/ 3

City University

Department of Electrical and Electronic Engineering (EEE)


Course Code: EEE 3216, Course Title: Microprocessor and Interfacing Laboratory

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

ASSUME CS:CODE, DS:CODE

MOV AX, 805EH

MOV DX, 0540H

ADD AX, DX

MOV BX, 0050H

SUB AX, BX

INC DX

DEC BX

HLT

CODE ENDS

END

C. Apparatus Required

1. 8086 microprocessor kit.


2. Instruction Guide.
3. Assembler “MASM”.
1
D. Procedures

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

message Microsoft (R) Macro Assembler Version 5.10


Copyright (C) Misrosoft Corp 1981, 1988. All right

reserved. Source filename [.ASM]

3. Follow the procedure given below to prepare machine code -

Source filename [.ASM]: filename Press ENTER

Object filename [C:filename.OBJ]: Press ENTER

Source listing [NUL.LST]: filename Press ENTER

Cross reference [NUL.CRF]: Press ENTER

4. Open the file “filename.lst” using notepad. Here you will find respective machine code for
each instruction.

5. Turn on the 8086 microprocessor kit.

6. Set the address 0000H : 1000H in MDA-8086 kit.

7. Write the machine codes in the appropriate memory address according the following table:

Offset Address Machine Code Instruction / Mnemonics


1000 B8 805E MOV AX, 805EH
1003 BA 0540 MOV DX, 0540H
1006 03 C2 ADD AX, DX
1008 BB 0050 MOV BX, 0050H
100B 2B C3 SUB AX, BX
100D 42 INC DX
100E 4B DEC BX
100F F4 HLT

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.

You might also like