Experiment 2: To Perform Addition & Subtraction of Two 8 Bit Numbers Using Microprocessor 8085A and 8051
Experiment 2: To Perform Addition & Subtraction of Two 8 Bit Numbers Using Microprocessor 8085A and 8051
AIM 2a: To perform addition of two 8 bit numbers using microprocessor 8085A and 8051.
Instruments Required:
1. Online Simulator 8085, Keil Software for 8051
ALGORITHM:
1) Start the program by loading the first data into Accumulator.
FLOW CHART:
Program:
8085
Code:
LDA 0000
//Move content of 0000 memory location to accumulator
MOV H,A
LDA 0001
ADD H
MOV L,A
MVI A,00
ADC A
MOV H,A
SHLD 0010
HLT
0001 08 0011 00
8051
Code:
ORG 0000H
MOV A, #45H
MOV B, #86H
ADD A, B
END
Conclusion:
The addition Of two 8-bit numbers is performed using 8085 and 8051 microprocessor Where sum is in 8-
bit.
Precautions(for hardware):
1. Properly connect the 8085 microprocessor kit with power supply terminals.
AIM 2b: To perform the subtraction of two 8 bit numbers using 8085 ans 8051.
PROGRAM:
8085
CODE:
MVI C,00
LHLD 0000
MOV A,H
SUB L
JNC LOOP
INR C
MOV A,C
STA 0011
HLT
OBSERVATION:
0001 01 0011 01
8051
Code:
ORG 000H
MOV A, R1
SUBB A, R2
END
Conclusion:
Thus the program to subtract two 8-bit numbers was executed.
Precautions(for hardware):
1. Properly connect the SOSS microprocessor kit with power supply terminals.