BCD ADDITION




ADDRESS
OPCODE
LABEL
MNEMONICS
OPERAND
COMMENT
4100

START
MVI
C, 00
Clear C reg.
4101         




4102


LXI
H, 4500
Initialize HL reg. to
4500
4103




4104




4105


MOV
A, M
Transfer first data to accumulator
4106


INX
H
Increment HL reg.  to point next memory    Location.
4107


ADD
M
Add first number to acc. Content.
4108


DAA

Decimal adjust accumulator
4109


JNC
L1
Jump to location if result does not yield carry.
410A




410B




410C


INR
C
Increment C reg.
410D

L1
INX
H
Increment HL reg.  to point next memory Location.
410E


MOV
M, A
Transfer the result from acc. to memory.
410F


INX
H
Increment HL reg. to point next memory Location.
4110


MOV
M, C
Move carry to memory
4111


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.