16 bit multiplication in 8085

Discussion in 'Assembly Language Programming (ALP) Forum' started by jcrajan00, Feb 7, 2008.

  1. jcrajan00

    jcrajan00 New Member

    Joined:
    Feb 7, 2008
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    hi I wrote this program for my lab class but didn't get it right and also I couldn't figure out the problem.. WhenI try it in a simulator I get the right answer for FFFF*FFFF , for other few no.s I get the the lower order bit correct I don't know where I am wrong..


    Code:
    	LXI B, 0000H
    	LHLD 8000H
    	XCHG
    	LHLD 8002H
    	DCX D
    L006:	LDA 8002H
    	ADD L
    	MOV L, A
    	LDA 8003H
    	ADC H
    	MOV H, A
    	JNC L013
    L013:	INX B
    	DCX D
    	MOV A, D
    	ORA E
    	JNZ L006
    	SHLD 8006H
    	MOV L, C
    	MOV H, B
    	SHLD 8004H
    	HLT
    
    
    Waiting for an reply..
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice