Go4Expert (http://www.go4expert.com/)
-   Assembly Language Programming (ALP) Forum (http://www.go4expert.com/forums/assembly-language-programming-forum/)
-   -   16 bit multiplication in 8085 (http://www.go4expert.com/forums/16-bit-multiplication-in-8085-t8711/)

jcrajan00 8Feb2008 02:17

16 bit multiplication in 8085
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..


        LXI B, 0000H
        LHLD 8000H
        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

Waiting for an reply..

All times are GMT +5.5. The time now is 09:42.