This is a program to add two 16 bit numbers in which one number is
stored at 8050 and 8051 and the 2nd number is stored at 8060 and
8061............ and the result is at 8070 and 8071
program:
LDA 8051H
LXI H,8061H
MOV B,M
MVI E,00H
ADD B
JNC loop1
INR E
loop1 STA 8071H
LDA 8050H
LXI H,8060H
MOV B,M
ADD E
ADD B
MVI E,00H
JNC loop 2
INR E
loop 2 STA 8070H
MOV A,E
STA 8072H
HLT
program:
LDA 8051H
LXI H,8061H
MOV B,M
MVI E,00H
ADD B
JNC loop1
INR E
loop1 STA 8071H
LDA 8050H
LXI H,8060H
MOV B,M
ADD E
ADD B
MVI E,00H
JNC loop 2
INR E
loop 2 STA 8070H
MOV A,E
STA 8072H
HLT
Comments
Rprogramming Training in annanagar
r-programming Training in marathahalli
r-programming Training in rajajinagar
r-programming Training in bangalore