Wednesday, 24 January 2018

8085 program to multiply two bcd numbers

Statement: Write an assembly language program to multiply 2 BCD numbers



8085 program to multiply two bcd numbers


MVI C, Multiplier : Load BCD multiplier
MVI B, 00 : Initialize counter
LXI H, 0000H : Result = 0000
MVI E, multiplicand : Load multiplicand
MVI D, 00H : Extend to 16-bits
BACK: DAD D : Result Result + Multiplicand
MOV A, L : Get the lower byte of the result
ADI, 00H
DAA : Adjust the lower byte of result to BCD.
MOV L, A : Store the lower byte of result
MOV A, H : Get the higher byte of the result
ACI, 00H
DAA : Adjust the higher byte of the result to BCD
MOV H, A : Store the higher byte of result.
MOV A, B : [Increment
ADI 01H : counter
DAA : adjust it to BCD and
MOV B,A : store it]
CMP C : Compare if count = multiplier
JNZ BACK : if not equal repeat
HLT : Stop
________________________________________________________________________

1 comments:

haru said...

I recommend to all This article To every One.
How to Check Diode Working condition

Here You Can Find Unlimited Whatsapp group Name For Promoting Your group

Also You can see This Online Money Earning Ways

Top 25 Tamil Movies Download Website

இதுவும் உங்களுக்கு உதவியாக இறுக்கும் நீங்கள் வளர வாழ்த்துக்க்கள் தமிழ் படங்களை பார்க்க 25 website Tamil Movies Website

You Need Governement Job Then Go to This Link Ind Govt job

Post a Comment

 
;