CSIT
CSIT
Objective:
This manual is used to provide an understanding of the 8085 assembly language programming.
Developed By:
Pooja Sharma,
Faculty member,
Computer Science and Information Technology,
April 2021
Microprocessor Pooja Sharma
Nepathya College,
Manigram, Butwal
Experiment Title Date
1. To find One’s complement of 8 bit number
2. To find Two’s complement of 8 bit number
3. To Exchange content of two memory
locations
4. To Add two 8 bit numbers
5. To Subtract two 8 bit numbers
6. To Add two 16 bit number
7. To Subtract 16 bit number
8. Block transfer
9. Multiplication of 8 bit number
10. Division of 8 bit number
11. Sorting array in acending order
12. Sorting array in decending order
13. To find largest number among array
14. To find smallest number among array
15. Introduction to microprocessor kit and To
find complement of 8 bit number using
microprocessor kit
16. To Add two 8 bit number using
microprocessor kit
17. To subtract two 8 bit number using 8085
microprocessor kit
April 2021
Microprocessor Pooja Sharma
Date:
Experiment: 1
Algorithm:
1. Start program by loading the data in memory location 4400H into accumulator.
2. Complement accumulator.
3. Store data of accumulator at address 4500H.
4. Stop the program.
Program:
LDA 4400H
CMA
STA 4500H
HLT
INPUT: 08(4400H)
OUTPUT: F7 (4500H)
April 2021
Microprocessor Pooja Sharma
Date:
Experiment: 2
Algorithm:
1. Start program by loading the data in memory location 2050H into accumulator.
2. Complement accumulator.
3. Add one to accumulator.
4. Store data of accumulator at address 3050H.
5. Stop the program.
Program:
LDA 2050H
CMA
ADI 01H
STA 3050H
HLT
INPUT: 08(2050H)
OUTPUT: F8 (3050H)
April 2021
Microprocessor Pooja Sharma
Result: - Thus the program to find 2’s complement of 8 bit data is executed.
Date:
Experiment: 3
Algorithm:
1. Start program by loading the first data of memory location 2000H into accumulator.
2. Move data of accumulator to B register.
3. Load the second data of memory location 4000H into accumulator.
4. Store content of accumulator at address 2000H.
5. Move data of B register to accumulator.
6. Store content of accumulator at address 4000H.
7. Stop the program.
Program:
LDA 2000H
MOV B, A
LDA 4000H
STA 2000H
MOV A,B
STA 4000H
HLT
April 2021
Microprocessor Pooja Sharma
April 2021
Microprocessor Pooja Sharma
Date:
Experiment: 4
Algorithm:
1. Start program by loading the first data of memory location 2020H into accumulator.
2. Move data of accumulator to B register.
3. Load the second data of memory location 2021H into accumulator.
4. Add accumulator with content of B register.
5. Store content of accumulator at address 2050H.
6. Stop the program.
Program:
LDA 2020H
MOV B, A
LDA 2021H
ADD B
STA 2050H
HLT
April 2021
Microprocessor Pooja Sharma
0AH (2021H)
OUTPUT: 0DH (2050H)
Date:
Experiment: 5
Algorithm:
1. Start program by loading the first data of memory location 3020H into accumulator.
2. Move data of accumulator to B register.
3. Load the second data of memory location 3021H into accumulator.
4. Subtract register B from accumulator.
5. Store content of accumulator at address 3050H.
6. Stop the program.
Program:
LDA 3020H
MOV B, A
LDA 3021H
SUB B
STA 3050H
HLT
April 2021
Microprocessor Pooja Sharma
05H (3021H)
OUTPUT: 02H (3050H)
Date:
Experiment: 6
Algorithm:
1. Start program by loading the Lower part of first data of memory location 2020H into
accumulator.
2. Move data of accumulator to B register.
3. Load the lower part of second data of memory location 2022H into accumulator.
4. Add accumulator with content of B register.
5. Store content of accumulator at address 2050H.
6. Load the higher part of first data of memory location 2021H into accumulator.
7. Move data of accumulator to B register.
8. Load the higher part of second data of memory location 2023H into accumulator.
9. Add accumulator with content of B register and carry.
10. Store content of accumulator at address 2051H.
11. Stop the program.
Program:
LDA 2020H
MOV B, A
LDA 2022H
April 2021
Microprocessor Pooja Sharma
ADD B
STA 2050H
LDA 2021H
MOV B, A
LDA 2023H
ADC B
STA 2051H
HLT
April 2021
Microprocessor Pooja Sharma
Date:
Experiment: 7
Algorithm:
1. Start program by loading the lower part of second data of memory location 3022H into
accumulator.
2. Move data of accumulator to B register.
3. Load the lower part of first data of memory location 2021H into accumulator.
4. Subtract register B from accumulator.
5. Store content of accumulator at address 3050H.
6. Stop the program.
Program:
LDA 3022H
MOV B, A
LDA 3020H
SUB B
STA 3050H
April 2021
Microprocessor Pooja Sharma
LDA 3023H
MOV B, A
LDA 3021H
SBB B
STA 3051H
HLT
April 2021
Microprocessor Pooja Sharma
Date:
Experiment: 8
Block Transfer
Aim : To perform the 8085 assembly language programming for block transfer from 0005H-
0009H to 000CH-0010H using GNUsim8085 simulator.
Algorithm:
Program:
LXI H, 0005H
LXI D, 000CH
MVI C, 05H
April 2021
Microprocessor Pooja Sharma
STAX D
INX H
INX D
DCR C
JNZ Loop
HLT
INPUT: 08(0005H)
E0(0006H)
02(0007H)
FF(0008H)
09(0009H)
OUTPUT: 08(000CH)
E0(000DH)
02(000EH)
FF(000FH)
09(0010H)
April 2021
Microprocessor Pooja Sharma
Date:
Experiment: 9
Algorithm:
1. Start program by loading the first data of memory location 2050H (multiplier) into
accumulator.
2. Move data of accumulator to C register.
3. Load the second data of memory location 2051H (multiplicand) into accumulator.
4. Move data of accumulator to D register.
5. Initialize A=0 and B=0
6. Add D to accumulator
7. If carry doesn’t occur decrement C and continue step 6 until C=0
8. If carry occurs increment B, decrement C and continue step 6 until C=0
9. Store value of accumulator to 2052H
10. Move value of B to Accumulator and then transfer to memory 2053H.
11. Stop the program.
Program:
LDA 2050H
MOV C,A
LDA 2051H
MOV D,A
April 2021
Microprocessor Pooja Sharma
MVI A,00H
MVI B,00H
REPEAT: ADD D
JNC FORWARD
INR B
FORWARD: DCR C
JNZ REPEAT
STA 2052H
MOV A, B
STA 2053H
HLT
April 2021
Microprocessor Pooja Sharma
Date:
Experiment: 10
Algorithm:
Program:
MVI C, 00H
LDA 2051H
MOV B, A
April 2021
Microprocessor Pooja Sharma
LDA 2050H
REPEAT: INR C
SUB B
JNC REPEAT
ADD B
STA 2053H
DCR C
MOV A, C
STA 2052H
HLT
April 2021
Microprocessor Pooja Sharma
Date:
Experiment: 11
Program:
INPUT:
OUTPUT:
April 2021
Microprocessor Pooja Sharma
Date:
Experiment: 12
Program:
INPUT:
OUTPUT:
April 2021
Microprocessor Pooja Sharma
Date:
Experiment: 13
Program:
INPUT:
OUTPUT:
April 2021
Microprocessor Pooja Sharma
Experiment: 14
Program:
INPUT:
OUTPUT:
April 2021
Microprocessor Pooja Sharma
Date:
Experiment: 15
Algorithm:
1. Start program by loading the data in memory location 2000H into accumulator.
2. Complement accumulator.
3. Store data of accumulator at address 2050H.
4. Stop the program.
Program:
LDA 2000H
CMA
STA 2050H
HLT
Hexcode:
Memory Hexcode
LDA 2001 3A
Lower bits of 2002 00
address
Higher bits of 2003 20
address
CMA 2004 2F
STA 2005 32
Lower bits of 2006 50
address
April 2021
Microprocessor Pooja Sharma
INPUT: 0D(2000H)
OUTPUT: F2 (2050H)
Result: - Thus the program to complement 8 bit data is executed by using 8085 kit.
April 2021
Microprocessor Pooja Sharma
Date:
Experiment: 16
Algorithm:
Program:
MVI A, 20H
MVI B, 0DH
ADD B
STA 2050H
HLT
Hexcode:
Memory Hexcode
MVI A 2001 3E
Data 2002 20
MVI B 2003 06
Data 2004 0D
ADD B 2005 88
STA 2006 32
lower bits of 2007 50
address
April 2021
Microprocessor Pooja Sharma
Output:
OUTPUT: 2D (2050H)
Result: - Thus the program to add two 8 bit data is executed by using 8085 kit.
April 2021
Microprocessor Pooja Sharma
Date:
Experiment: 17
Algorithm:
Program:
MVI A, 20H
MVI B, 0DH
SUB B
STA 2050H
HLT
Hexcode:
Memory Hexcode
MVI A 2001 3E
Data 2002 20
MVI B 2003 06
Data 2004 0D
April 2021
Microprocessor Pooja Sharma
SUB B 2005 90
STA 2006 32
lower bits of 2007 50
address
Higher bits of 2008 20
Address
HLT 2009 76
Output:
OUTPUT: 13 (2050H)
Result: - Thus the program to subtract two 8 bit data is executed by using 8085 kit
April 2021