Adit's Micro File
Adit's Micro File
Submitted by:
(GROUP NO – 3)
NAVPREET SINGH KAPOOR: 101803293
ANSH GARG: 101803295
VINAY CHOUHAN: 101803296
KAJAL GOEL: 101803297
BE Third Year
Submitted to-
Dr. MANJU KHURANA
S. No CONTENT Page No
1. Introduction of 8085-microprocessor kit and steps for execution on 1–3
the kit.
2. Familiarity with 8085-microprocessor kit. 4 – 12
i) Write a program to store 8-bit data into one register and then 4
copy that to all registers.
iii) Write a program to add 8-bit numbers using direct and indirect 6–7
addressing mode.
iv) Write a program to add 16-bit numbers using direct and indirect 8–9
addressing mode.
v) Write a program to 8-bit numbers using carry. (using JNC 10
instruction).
vi) Write a program to find 1’s complement and 2’s complement 11 – 12
of 8-bit number.
3. Write a program for the sum of series of numbers. 13
4. Write a program for data transfer from memory block B1 to memory 14
block B2.
5. Write a program for multiply two 8-bit numbers. 15
6. Write a program to add ten 8-bit numbers. Assume the numbers are 16
stored in 8500-8509. Store the result in 850A and 850B memory
address.
7. Write a program to find the negative numbers in a block of data. 17
8. Write a program to count the number of one's in a number. 18
9. Write a program to arrange numbers in Ascending order. 19
10. Calculate the sum of series of even numbers. 20
11. Write an assembly language program to verify how many bytes are 21
present in a given set, which resembles 10101101 in 8085.
12. Write an assembly language program to find the numbers of even 22
parity in ten consecutive memory locations in 8085.
13. Write an assembly language program to convert a BCD number into 23
its equivalent binary in 8085.
14. Write an assembly language program for exchange the contents of 24
memory location.
15. Write a program to find the largest number in an array of 10 elements. 25
Q1. Introduction of 8085-microprocessor kit and steps for execution on the
kit.
Diagram:
Description:
The 8085 is a conventional von Neumann design based on the Intel 8080. Unlike the 8080 it
does not multiplex state signals onto the data bus, but the 8-bit data bus is instead multiplexed
with the lower eight bits of the 16-bit address bus to limit the number of pins to 40.It is designed
using NMOS technology. The 8085 incorporates the functions of the 8224 (clock generator)
and the 8228 (system controller) on chip, increasing the level of integration. The 8085 can
accommodate slower memories through externally generated wait states (pin 35, READY),
and has provisions for Direct Memory Access (DMA) using HOLD and HLDA signals (pins
39 and 38).
It is used in washing machines, microwave ovens, mobile phones, etc.
1
Features:
Hardware Specifications:
• Flag registers consisting of five status flags: Sign status (S), Zero status (Z),
Auxiliary carry status (AC), Parity status (P), Carry status (CS)
2
Steps to run/execute program on 8085 microprocessors:
1. Press Reset
2. Press examine memory
3. Enter starting Address of the program
4. Press Next
5. Enter opcode by subsequently pressing next
6. Press reset (skip in case of registers)
7. Press Go
8. Enter starting address of the program
9. Press EXEC/FILL
10. Press Reset
11. Press Examine Register
12. Enter Output address/register
13. Press Next
3
Q2. Familiarity with 8085-microprocessor kit.
i) Write a program to store 8-bit data into one register and then copy
that to all registers.
MOV B, A 8002 47
MOV C, A 8003 4F
MOV D, A 8004 57
MOV E, A 8005 5F
MOV H, A 8006 67
MOV L, A 8007 6F
RST 5 8008 EF
OUTPUT:
A - 48, B - 48, C - 48, D - 48, E - 48, H - 48, L – 48
4
ii) Write a program for addition of two 8-bit numbers.
ADD B 8004 80
RST 5 8008 EF
OUTPUT:
[8500] – 90
5
iii) Write a program to add 8-bit numbers using direct and indirect
addressing mode.
INPUT:
OUTPUT:
[ 8502] – 10
6
INDIRECT ADDRESSING MODE:
INPUT:
OUTPUT:
A – 10
7
iv) Write a program to add 16-bit numbers using direct and indirect
addressing mode.
XCHG 8003 EB
DAD D 8007 19
RST 5 800B EF
INPUT:
OUTPUT:
8
INDIRECT ADDRESSING MODE:
CODE MEMORY LOCATION OPCODE
LXI B, 8500 8000,8001,8002 01, 00, 85
LDAX B 8003 0A
MOV D, A 8004 57
INX B 8005 03
LDAX B 8006 0A
ADD D 8007 82
STA 8504 8008,8009,800A 32, 04, 85
INX B 800B 03
LDAX B 800C 0A
MOV D, A 800D 57
INX B 800E 03
LDAX B 800F 0A
ADC D 8010 8A
STA 8505 8011,8012,8013 32, 05, 85
RST 5 8014 EF
INPUT:
[ 8500] – 34, [ 8501] – 48, [ 8502] – 54, [ 8503] – 78
OUTPUT:
[ 8504] – 7C , [ 8505] – CC
9
v) Write a program to 8-bit numbers using carry. (using JNC
instruction).
INPUT:
[ 8500] – 88, [ 8501] – 88
OUTPUT:
[ 8502] – 10, [ 8503] – 01
10
vi) Write a program to find 1’s complement and 2’s complement of 8-bit
number.
1’s COMPLEMENT:
CODE MEMORY LOCATION OPCODE
LDA 8500H 8000,8001,8002 3A, 00, 85
CMA 8003 2F
STA 8501H 8004,8005,8006 32, 01, 85
RST 5 8007 EF
INPUT:
[8500] – 48
OUTPUT:
[8501 – B7
11
2’s COMPLEMENT
CODE MEMORY LOCATION OPCODE
LDA 8500H 8000,8001,8002 3A, 00, 85
CMA 8003 2F
INR A 8004 3C
STA 8501H 8005,8006,8007 32, 01, 85
RST 5 8008 EF
INPUT:
[8500] – 48
OUTPUT:
[8501] – B8
12
Q3. Write a program for the sum of series of numbers.
INPUT:
RESULT:
1B3
OUTPUT:
[8600] – B3
13
Q4. Write a program for data transfer from memory block B1 to memory
block B2.
STAX D 8009 12
INX H 800A 23
INX D 800B 13
DCR C 800C 0D
RST 5 8010 EF
INPUT:
OUTPUT:
14
Q5. Write a program for multiply two 8-bit numbers.
MOV E, A 8003 5F
MVI D, 00 8004,8005 16,00
LDA 8501H 8006,8007,8008 3A,01,85
MOV C, A 8009 4F
INPUT:
RESULT:
B2 + B2 + B2 = 0216H
OUTPUT:
15
Q6. Write a program to add ten 8-bit numbers. Assume the numbers are
stored in 8500-8509. Store the result in 850A and 850B memory address.
INPUT:
[8500] – FF, [8501] – 01, [8502] – 01, [8503] – 01, [8504] – 01, [8505] – 01, [8506] – 01,
[8507] – 01, [8508] – 01, [8509] – 01
OUTPUT:
[850A] – 08, [850B] – 01
16
Q7. Write a program to find the negative numbers in a block of data.
INPUT:
RESULT:
02
OUTPUT:
[8600] – 02
17
Q8. Write a program to count the number of one's in a number.
INR D 800B 14
MOV A, D 8010 7A
RST 5 8014 EF
INPUT:
[8500] – 25 0010 0101
OUTPUT:
[8600] – 03
18
Q9. Write a program to arrange numbers in Ascending order.
INPUT:
[8500] – 05, [8501] – 05, [8502] – 04, [8503] – 03, [8504] – 02, [8505] – 01
OUTPUT:
[8500] – 05, [8501] – 01, [8502] – 02, [8503] – 03, [8504] – 04, [8505] – 05
19
Q10. Calculate the sum of series of even numbers.
INPUT:
[8500] – 04, [8501] – 20, [8502] – 15, [8503] – 13, [8504] – 22
OUTPUT:
[8600] - 42
20
Q11. Write an assembly language program to verify how many bytes are
present in a given set, which resembles 10101101 in 8085.
INPUT:
[8500] – AD, [8501] – 01, [8502] – 01, [8503] – 01, [8504] – 01, [8505] – 01,
[8506] – 01, [8507] – 01, [8508] – 01, [8509] – 01
OUTPUT:
[8600] – 01
21
Q12. Write an assembly language program to find the numbers of even
parity in ten consecutive memory locations in 8085.
INPUT:
[8500] – 01, [8501] – 03, [8502] – 01, [8503] – 03, [8504] – 01, [8505] – 03,
[8506] – 01, [8507] – 03, [8508] – 01, [8509] – 03
OUTPUT:
[8600] – 05
22
Q13. Write an assembly language program to convert a BCD number into
its equivalent binary in 8085.
INPUT:
[8500] – 67
OUTPUT:
[8600] – 43
23
Q14. Write an assembly language program for exchange the contents of
memory location.
MOV B, A 8003 47
MOV A, B 800A 78
RST 5 800E EF
INPUT:
[8500] – 48, [8600] – 88
OUTPUT:
[8500] – 88, [8600] – 48
24
Q15. Write a program to find the largest number in an array of 10 elements.
INPUT:
OUTPUT:
[850A] – 0A
25