novschopin
Junior Member level 1
can anyone please explain what are these codes all about in every single line?? thanks
; Fet@89c5x Integrated Development Environment (Assembly Code)
ORG 0000H
JMP MAIN
ORG 000BH
JMP T0ISR
ORG 0023H
JMP SISR
ORG 0030H
MOV R0, #12 ; motor speed on time
MOV R1, #0
MAIN: MOV SCON, #52H
MOV TMOD, #21H
MOV TH1, #-3
SETB TR1
SETB TF0
MOV IE, #10010010B
AGAIN: SETB P3.7
SETB P3.3
CLR P3.4
CLR P3.5
SCAN: CJNE R1, #20, JJ
MOV R1, #0
JMP AGAIN
JJ: MOV A, R1
MOV 22H, R0
CJNE A, 22H, J2
SETB C
J2: JC SCAN
CLR P3.7
CLR P3.3
JMP SCAN
T0ISR: CLR TR0
MOV TH0, #HIGH(-921)
MOV TL0, #LOW(-921)
INC R1
SETB TR0
RETI
SISR: CLR RI
CLR TI
MOV A, SBUF
CJNE A, #"F", N1
MOV R0, #17
RETI
N1: CJNE A, #"M", N2
MOV R0, #10
RETI
N2: CJNE A, #"S", N3
MOV R0, #4
N3: RETI
END
; Fet@89c5x Integrated Development Environment (Assembly Code)
ORG 0000H
JMP MAIN
ORG 000BH
JMP T0ISR
ORG 0023H
JMP SISR
ORG 0030H
MOV R0, #12 ; motor speed on time
MOV R1, #0
MAIN: MOV SCON, #52H
MOV TMOD, #21H
MOV TH1, #-3
SETB TR1
SETB TF0
MOV IE, #10010010B
AGAIN: SETB P3.7
SETB P3.3
CLR P3.4
CLR P3.5
SCAN: CJNE R1, #20, JJ
MOV R1, #0
JMP AGAIN
JJ: MOV A, R1
MOV 22H, R0
CJNE A, 22H, J2
SETB C
J2: JC SCAN
CLR P3.7
CLR P3.3
JMP SCAN
T0ISR: CLR TR0
MOV TH0, #HIGH(-921)
MOV TL0, #LOW(-921)
INC R1
SETB TR0
RETI
SISR: CLR RI
CLR TI
MOV A, SBUF
CJNE A, #"F", N1
MOV R0, #17
RETI
N1: CJNE A, #"M", N2
MOV R0, #10
RETI
N2: CJNE A, #"S", N3
MOV R0, #4
N3: RETI
END