Multiplication by Shift and Add Method - 8051 - Assembly Program Code - AT89C51


Flowchart :-



Program :-

ORG 0000H
MOV R0,#0
MOV B,40H
MOV R2,41H
MOV R3,#8
LOOP: CLR C
MOV A,R0
JNB B.0,SHIFT
ADD A,R2
SHIFT: RRC A
MOV R0,A
MOV A,B
RRC A
MOV B,A
DJNZ R3,LOOP
MOV 42H,R0
MOV 43H,B
HERE: SJMP HERE
END

Output :-



For more ASM programs - click here

Popular posts from this blog

8051 Assembly Program Code for Sorting in Descending Order - Keil - AT89C51

8051 Assembly Program Code for Sorting in Ascending Order - Keil -AT89C51