Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

recopilation program 89c52/89c51 using keil

Status
Not open for further replies.

electrogo

Newbie level 1
Newbie level 1
Joined
Mar 7, 2013
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Visit site
Activity points
1,294
SUM


assembly language:
MOV DPTR,#0E000H
MOVX A,@DPTR
MOV R0,A
MOV DPTR,#0E001H
MOVX A,@DPTR
ADD A,R0
MOV DPTR,#0E002H
MOVX @DPTR,A
FIN: SJMP FIN
END





SUBTRACTION

assembly language

MOV DPTR,#0E000H
MOVX A,@DPTR
MOV R0,A
MOV DPTR,#0E001H
MOVX A,@DPTR
SUBB A,R0
MOV DPTR,#0E002H
MOVX @DPTR,A
FIN: SJMP FIN
END






MULTIPLICATION

assembly language

MOV DPTR,#0E000H
MOVX A,@DPTR
MOV B,A
MOV DPTR,#0E001H
MOVX A,@DPTR
MUL AB
MOV DPTR,#0E002H
MOVX @DPTR,A
MOV A,B
MOV DPTR,#0E003H
MOVX @DPTR,A
FIN: SJMP FIN
END






DIVISION

assembly language

MOV DPTR,#0E000H
MOVX A,@DPTR
MOV B,A
MOV DPTR,#0E001H
MOVX A,@DPTR
DIV AB
MOV DPTR,#0E002H
MOVX @DPTR,A
MOV A,B
MOV DPTR,#0E003H
MOVX @DPTR,A
FIN: SJMP FIN
END


SUM WITH CARRY

assembly language

DATO1: MOV DPTR,#0E000H
MOVX A,@DPTR
MOV R0,A
DATO2: INC DPTR
MOVX A,@DPTR
MOV R1,A
MOV A,R0
ADD A,R1
CARRIE: JC BRINCOC
INC DPTR
MOVX @DPTR,A
INC DPTR
CLR A
MOVX @DPTR,A
SJMP FIN
BRINCOC: INC DPTR
MOVX @DPTR,A
INC DPTR
MOV A,#01H
MOVX @DPTR,A
SJMP FIN


SUBTRACTION WITH CARRY

assembly language

DATO1: MOV DPTR,#0E000H
MOVX A,@DPTR
MOV R0,A
DATO2: INC DPTR
MOVX A,@DPTR
MOV A,R0
SUBB A,R1
JC CARES
INC DPTR
CLR A
MOVX @DPTR,A
JC FIN
CARES: INC DPTR
CPL A
INC A
MOVX @DPTR,A
ADD A,#01H
INC DPTR
MOV A,#01H
MOVX @DPTR,A
SJMP FIN



IF YOU WANT TO LEARN MORE VISIT

http://conocimientoelectronico.blogspot.mx/
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top