Python,C,C++ and JAVA programs for CBSE, ISC, B.Tech and I.T Computer Science and MCA students

The Programming Project: Program to add 16 bit numbers in 8085

Tuesday, April 30, 2013

Program to add 16 bit numbers in 8085


Two 16 bits number 2498H and 54A1H is to added the lower 8-bit sum stored at 0000H, higher 8-bit sum at 0001H and the carry at 0002H

LXI H,2498H
LXI D,54A1H
XRA A
MOV B,A
MOV A,E
ADD L
STA 0000H
MOV A,D
ADC H
JNC SKIP
INR B
SKIP: STA 0001H
MOV A,B
STA 0002H
HLT


No comments:

Post a Comment