Friday, 16 September 2016

How to Write a Program to perform 8-bit addition,subtraction,multiplication,division (8051)

MOV  R0,#02H 
MOV  R1,#03H
MOV  R2,#04H
MOV  R3,#05H
MOV  A,R0
ADD  A,R1
MOV  R0,A
MOV A,R2
SUBB  A,R1
MOV  R1,A
MOV  A,R1
MOV  B,R2
MUL  AB
MOV  R2,A
MOV  A,R3
MOV  B,R0
DIV  AB
MOV  R3,A
END 

No comments:

Post a Comment