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

EXP#05 Updated

The document contains instructions for several tasks involving writing code in EMU8086 to perform calculations and display output. Some of the tasks involve writing code to display numbers on a seven segment display in different orders, analyzing temperature control code, finding prime numbers in a set, counting digits in binary numbers, calculating factorials, finding averages and modes of data sets, and separating even and odd numbers.

Uploaded by

Muhammad Awais
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)
57 views

EXP#05 Updated

The document contains instructions for several tasks involving writing code in EMU8086 to perform calculations and display output. Some of the tasks involve writing code to display numbers on a seven segment display in different orders, analyzing temperature control code, finding prime numbers in a set, counting digits in binary numbers, calculating factorials, finding averages and modes of data sets, and separating even and odd numbers.

Uploaded by

Muhammad Awais
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/ 8

EXP#06

MEDIAS TRAINER 8086


TASK #01
SEVEN SEGMENT DISPLAY CODE:
/*****************************************

* MDE-Win8086 EXPERIMENT PROGRAM *

* FILENAME : FND.C

* PROCESSOR : I8086

* 8255 TEST

*****************************************/

#include "mde8086.h"

int data[11] = { 0xc0, 0xf9, 0xa4, 0xb0, 0x99, 0x92,

0x82, 0xf8, 0x80, 0x90, 0x00 };

void wait(long del)

while( del-- );

void main(void)

int *data1;

outportb( PPI1_CR, 0x80 );

outportb( PPI1_B, 0xf0 );

outportb( PPI1_C, 0x00 );


do {

data1 = data;

while( *data1 != 0x00 ){

outportb( PPI1_A, *data1 );

wait(30000);

data1++;

}while(1);

1) Write a program to display numbers on seven-segment display in an


ascending order.
2) Write a program to display numbers on seven-segment display in a
descending order.
3) Write a program to display even numbers on seven-segment display.
4) Write a program to display odd numbers on seven-segment display.
5) Execute and analyze the code of LCD and replace the string with your name
and roll no.

EMU 8086
TASK#02 ( Example code: Thermometer)
Execute the code for keeping temperature with in specific limit by
using burner and thermometer.
1) Analyze the code by changing the window of lower and higher temperature?
2) How his system will go about its sequential running by manual shutdown of burner?
3) Is there any change observe if we keep environmental temperature greater then lower
limit of temperature???
a)Check for higher and lower thresh hold of temperature

b)Then It will Jump to function low&high to attain desired temperature according to the
state

c)OUPUT OF CODE
TASK#03) Write a code for finding a number of prime numbers from given set
{3,5,7,9,11,13,19,21,25,31,33,49,38,29}
The problem with code is that it’s not considering 3,5,7 as a prime number
please make it viable for these numbers too
LAB TASK: Find the total numbers which are divisible by 4,3,5 from given sets
{23,24,56,86,44,32,26,16,94,55,12,8,9,13}

TASK#04 Find no of zeros in a word 3897H


LAB TASK: Find the number of one in a word 4982H using JC command. No addition
and subtraction operation allowed outside the body of loop.

TASK#05 Write a code in EMU8086 to find the factorial of given number.


LAB TASK: Find the factorial of one using the same code and maximum one change is
allowed in the program

TASK#06 Find Average of five numbers 31,73,91,43,66

LAB TASK: Find the mode from the set of numbers {3,5,3,2,6,7,8}
TASK#07) Separate even & odd from given numbers 31,44,93,67,84,91,18

You might also like