Microprocessor 8085 program TO ADD TWO 4-DIGIT BCD DATA


#1

TO ADD TWO 4-DIGIT BCD DATA

LDA 000
MOV B,A
LDA 002
MVI C,00
ADD B
DAA
STA 004
LDA 001
MOV B,A
LDA 003
ADC B
DAA
STA 005
JNC GO
INR C

[GO] MOV A,C
STA 006
HLT

Here, 000 & 001 -> 1st Operand 002 & 003 -> 2nd Operand
004 & 005 -> Sum 006 -> Carry