Saturday, 28 September 2013

program to perform multiplication of two 8 bit no.s using successive addition method

        ORG 000H
        SJMP START
        RESL EQU 30H
        RESH EQU 31H
START : MOV A,#00H
        MOV B,#_H      /*enter 1st no. */
        MOV R0,#_H     /*enter 2nd no. */
   UP : ADD A,B
        JNC DOWN
        INC RESH
 DOWN : DJNZ R0,UP
        MOV RESL,A
 STOP : SJMP STOP
        END


output :

sl.no  N1    N2    RESH   RESL
      (1st no.)  (2nd no.)  (31H)        (30H)

 1.    8     32     1     90
 2.    6     12     0     6C
 3.    9     14     0     B4    

No comments:

Post a Comment