100% found this document useful (1 vote)
62 views

Mpi - Lab No - 2

This lab manual outlines the procedures for writing machine code on an 8086 trainer board and running simple programs to observe register values and flag bits. Students will learn to manually enter machine code into memory locations using the keypad and run programs by single stepping through instructions. The document provides an example program and machine codes to store on the board along with steps for verifying the stored data.
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
100% found this document useful (1 vote)
62 views

Mpi - Lab No - 2

This lab manual outlines the procedures for writing machine code on an 8086 trainer board and running simple programs to observe register values and flag bits. Students will learn to manually enter machine code into memory locations using the keypad and run programs by single stepping through instructions. The document provides an example program and machine codes to store on the board along with steps for verifying the stored data.
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/ 5

LAB MANUAL Microprocessor Interfacing

LAB NO. 2 14/07/2021

Writing Machine Code on 8086 trainer board and running program

Lab outcomes:
After completing this lab, students will be able to;
 Write machine code of Assembly or C program on 8086 using keypad
 Run program stored in memory
 See registers values and how each statement changes register values and Flag
register bits
Corresponding CLO and PLO:
CLO-1, PLO-5
Theory:
To write a program using keypad you need to translate the assembly language
program into machine language using compiler then manually enter machine code
on each memory location using DA button. To run the program, go back to
starting address by restarting then press STP key to execute one statement at time.
It is valid only when the display is in current Flag form. Pressing "STP" key
causes the CPU to execute one instruction point according to the user's PC. After
execution, the monitor regains control and displays the new PC and its contents.
The user may examine and modify registers and memory contents after each step.
Equipment:
 MDA 8086 trainer board
Procedure:

KEY
segment

RES MDE8086 Kit V9.5

Midas 2109-5964/5
AD Seg. 0set data
0000 1000 B8
offset

[The contents of memory 0000:1000]

1) MOV AX, 0
(Next address)

IP=1003 FL=0100
STP =...t......
LAB MANUAL Microprocessor Interfacing

Result verify ! Current Flag content (It means single


step)

AX=0000 BX=0000
CX=0000 DX=0000
+

Current Register content


2) SHAF
(Next address)

STP
IP=1004 FL=0100
=...t......
3) ADD AX, 4789H
(Next address)

IP=1007 FL=0100
STP =...t......

Result verify !
AX=4789 BX=0000
+
CX=0000 DX=0000
LAB MANUAL Microprocessors and Microcontrollers

LAB TASK:
Write the Machine Code for the following addresses to show how the following will be
burnt(store) into the 8086 trainer Board after that briefly explain the steps for checking the stored
Data.

ADDRESS MACHINE CODE MNEMONIC

1000 B8 0000 MOV AX ,0


1003 9E SAHF
1004 05 8947 ADD AX, 4789H
1007 15 8864 ADC AX, 6488H
100A 04 88 ADD AL, 88H
100C 80 D4 33 ADC AH, 33H
;
100F 2D 6735 SUB AX, 3567H
1012 1D 0080 SBB AX, 8000H
1015 2C 45 SUB AL, 45H
1017 80 DC 78 SBB AH, 78H
;
101A B0 FF MOV AL, FFH
101C FE C0 INC AL
101E FE C8 DEC AL
1020 98 CBW
1021 F6 D8 NEG AL
;
1023 B0 F0 MOV AL, F0H
1025 B3 11 MOV BL, 11H
1027 F6 E3 MUL BL
;
1029 B8 00F0 MOV AX, F000H
102C BB 3412 MOV BX, 1234H
102F F7 EB IMUL BX
LAB MANUAL Microprocessors and Microcontrollers

Observations:
Please write your observation after conducting this lab, you have to write in few lines, what
did you learn in this lab
LAB MANUAL Microprocessors and Microcontrollers

Rubrics
Absent Student is Student can Student has Student has Student
unable to understand followed constructed perfectly
follow the the provided instructions the implemented a
provided laboratory to construct functional/ working
instructions instructions the working model/ logic/
properly. and familiar fundamental schematic/ circuit/ block
The student with the lab schematic/ model/ block diagram/ code
can name the environment block diagram/ and
hardware or (Trainer/ diagram/ code, and successfully
Demonstration
simulation software/ code/ model have executed the
platform, but IDE), but on the successfully lab objective
unable to cannot protoboard/ executed the in Realtime or
implement implement trainer/ program/ run in a
anything on the simulation circuit on simulation
practically or platform software. software environment
on the practically or platform and produced
software on the the desired
software results
Category Ungraded Very Poor Poor Fair Good Excellent
Percentage [0] [1-20] [21-40] [41-60] [61-80] [81-100]
Marks 0.0 1-5 6 - 10 11- 15 16- 20 21 - 25.0
Date Total Marks Instructor’s Signature

Report not Plagiarized Requirement Observation Appropriate Correctly


submitted content s are listed s are computations drawn
presented or and recorded or numerical conclusion
Laboratory incomplete experimental along with analysis is with
Reports submission procedure is detailed performed exact results
presented procedure and complete
report in all
respects
Category Ungraded Very Poor Poor Fair Good Excellent
Percentage [0] [1-20] [21-40] [41-60] [61-80] [81-100]
Marks 0.0 0.1 - 2 3-4 5-6 7-8 9 - 10
Date Total Marks Instructor’s Signature

You might also like