16 BIT DATA ADDITION



ADDRESS
OPCODE
LABEL
MNEMONICS
OPERAND
COMMENT
8000

START
LHLD
8050H
Load the augend in DE pair through HL pair.
8001




8002




8003


XCHG

8004


LHLD
8052H
Load the addend in HL pair.
8005




8006




8007


MVI
A, 00H
Initialize reg. A for carry
8008




8009


DAD
D
Add the contents of HL
Pair with that of DE pair.
800A


JNC
LOOP
If there is no carry, go to the instruction labeled LOOP.
800B




800C




800D


INR
A
Otherwise increment  reg. A
800E

LOOP
SHLD
8054H
Store the content of HL Pair in 8054H(LSB of sum)
800F




8010




8011


STA
8056H
Store the carry in 8056H through Acc.
(MSB of sum).
8012




8013




8014


HLT

Stop the program.

Comments

Popular posts from this blog

8086 STRING MANIPULATION –FIND AND REPLACE A WORD

Animated Circles In C++

C program to find out the sum of series 1 + 2 + …. + n.