0% found this document useful (0 votes)
5 views10 pages

8085 Microprocessor Lab Assignments

This document contains 5 problems involving microprocessor operations using the 8085 microprocessor. Problem 1 counts the number of bytes above 3C and below 64 from memory locations 8C50 and stores the count in locations 9060. Problem 2 adds two numbers from ports and stores the result in port 03. Problem 3 subtracts two numbers from ports and stores the result in port 03. Problem 4 multiplies two numbers from ports and stores the result in ports 12 and 13. Problem 5 divides two numbers from ports and stores the quotient in port 03 and the remainder in port 04.

Uploaded by

stefan
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)
5 views10 pages

8085 Microprocessor Lab Assignments

This document contains 5 problems involving microprocessor operations using the 8085 microprocessor. Problem 1 counts the number of bytes above 3C and below 64 from memory locations 8C50 and stores the count in locations 9060. Problem 2 adds two numbers from ports and stores the result in port 03. Problem 3 subtracts two numbers from ports and stores the result in port 03. Problem 4 multiplies two numbers from ports and stores the result in ports 12 and 13. Problem 5 divides two numbers from ports and stores the quotient in port 03 and the remainder in port 04.

Uploaded by

stefan
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

INDIAN INSTITUTE OF INFORMATION TECHNOLOGY, KALYANI

Name: DUPPALA POORNACHANDU

Roll No. : CSE/19027/454

Microprocessor and Microcontroller (EC 511) Lab Assignment 6(8085 Microprocessor)

PROB.1

A SET OF 10 BYTES ARE STORED AT MEMORY LOCATIONS STARTING FROM

[Link] AN ALP TO CHECK EACH BYTE AND SAVE THE NO. OF BYTES THAT ARE

HIGHER THAN 3C AND LOWER THAN 64 IN MEMORY LOCATIONS STARTING FROM


9060H ONWARDS.

TABLE:
MEMORY MNEMONICS OPCODE
8000 LXI H, 8C50H 21 50 8C
8003 MOV C, M 4E
8004 LXI D, 9060H 11 60 90
8007 loop: INX H 23
8008 MOV A, M 7E
8009 CPI 3CH FE 3C
800B JC skip DA 15 80
800E CPI 64H FE 64
8010 JNC skip D2 15 80
8013 STAX D 12
8014 INX D 13
8015 skip: DCR C 0D
8016 JNZ loop C2 07 080
8019 hlt 76

Experimental results :

1
2
PROB.2
ADDITION OF TWO NUMBERS GIVEN THROUGH PORTS. RESULT WILL ALSO BE

STORED IN SOME PORT ADDRESS.

TABLE:

MEMORY MNEMONICS OPCODE


8000 IN 02H DB 02
8002 MOV B,A 47
8003 IN 01H DB 01
8005 ADD B 80
8006 OUT 03H D3 03
8008 hlt 76

Experimental results :

3
4
PROB.3
SUBTRACTION OF TWO NUMBERS GIVEN THROUGH PORTS. RESULT WILL ALSO BE
STORED IN SOME PORT ADDRESS.
TABLE

MEMORY MNEMONICS OPCODE


8000 IN 02H DB 02
8002 MOV B,A 47
8003 IN 01H DB 01
8005 SUB B 90
8006 OUT 03H D3 03
8008 hlt 76

Experimental Results :

5
6
PROB.4

MULTIPLICATION OF TWO NUMBERS GIVEN THROUGH PORTS. RESULT WILL

ALSO BE STORED IN SOME PORT ADDRESS.

TABLE
MEMORY MNEMONICS OPCODE
8000 IN 10H DB 10
8002 MOV B,A 47
8003 IN 11H DB 11
8005 MOV C,A 4F
8006 SUB A 97
8007 LOOP: ADD B 80
JNC
8008 NOCARRY D2 0C 080
800B INR D 14
NOCARRY: DCR
800C C 0D
800D JNZ LOOP C2 07 080
8010 OUT 12H D3 12
8012 MOV A,D 7A
8013 OUT 13H D3 13
8015 hlt 76

Experimental Results

7
8
PROB. 5
DIVISION OF TWO NUMBERS GIVEN THROUGH PORTS. RESULT WILL ALSO BE
STORED IN SOME PORT ADDRESS.
TABLE:

MEMORY MNEMONICS OPCODE


8000 IN 02H DB 02
8002 MOV B,A 47
8003 IN 01H DB 01
8005 LOOP: CMP B B8
8006 JM EXIT FA 0E 080
8009 SUB B 90
800A INR C 0C
800B JNZ LOOP C2 05 080
800E EXIT: OUT 04H D3 04
8010 MOV A,C 79
8011 OUT 03H D3 03
8013 hlt 76

EXPERIMENTAL RESULTS:

9
10

You might also like