electrogo
Newbie level 1
- Joined
- Mar 7, 2013
- Messages
- 1
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1,281
- 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/
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/