ORG 0000H
MOV R0,#12H;MSB1
MOV R1,#56H;MSB2
MOV R2,#34H;LSB1
MOV R3,#78H;LSB2
MOV A,R2; move the contents of R2 to A
MOV B,R3; move the contents of R3 to B
MUL AB; multiply the contents of A & B
MOV R4,A; move the contents of R4 to A
MOV R5,B; move the contents of R5 to B.
MOV A,R3; move the contents of A to R3
MOV B,R0; move the contents of B to R0
MUL AB; multiply the contents of A & B
ADDC A,R5; add the contents of R5 to A with carry
MOV R5,A; move the contents of Ato R5.
MOV R6,B; move the contents of B to R6.
MOV A,R2; move the contents of R2 to A
MOV B,R1; move the contents of R1 to B
MUL AB; multiply the contents of A & B
ADDC A,R5; add the contents of R5 to A with carry
MOV R5,A; move the contents of A to R5.
MOV A,B; move the contents of B to A
ADDC A,R6; add the contents of R6 to A with carry
MOV R6,A; move the contents of R6 to A.
MOV B,R0; move the contents of R0 to B
MOV A,R1; move the contents of R1 to A
MUL AB; multiply the contents of A & B
ADDC A,R6; add the contents of R6 to A with carry
MOV R6,A; move the contents of A to R6
MOV R7,B; move the contents of B to R7
END

Leave a comment