AJMP START
ORG 0600H
START:MOV TMOD,#51H
MOV TH0,#3CH
MOV TL0,#0B0H
MOV IE,#82H
MOV TH1,#00H
MOV TL1,#00H
SETB TR0
SETB TR1
LOOP:SJMP $
ORG 000BH
AJMP BTR0
ORG 0080H
BTR0:CLR TR1
CLR TR0
MOV A,TH1
CJNE A,#01H,NEXT1
SJMP NEXT2
NEXT1:JC BEGIN
JNC NEXT4
NEXT2:MOV A,TL1
CJNE A,#0F4H,NEXT3
SJMP NEXT4
NEXT3:JC BEGIN
JNC NEXT4
NEXT4:MOV A,#99H
MOV P1,A
MOV P2,A
LJMP LAST
BEGIN:MOV A, TL1
MOV B,#14H
MUL AB
MOV R2,B
MOV B,#10H
DIV AB
MOV R0,A
MOV R1,B
MOV A,TH1
MOV B,#14H
MUL AB
ADD A,R2
MOV B,#10H
DIV AB
MOV R2,B
MOV R7,A
MOV B,#06H
MUL AB
MOV B,#0AH
DIV AB
MOV 40H,A
MOV 41H,B
MOV B,#06H
MOV A,R0
MUL AB
MOV B,#0AH
DIV AB
MOV R3,A
MOV R4,B
MOV A,R2
MOV B,#06H
MUL AB
MOV B,#0AH
DIV AB
MOV R5,A
MOV R6,B
MOV A,R1
ADD A,R4
ADD A,R6
ADD A,41H
MOV B,#0AH
DIV AB
MOV R1,B
ADD A,R0
ADD A,R3
ADD A,R5
MOV R0,A
MOV A,R2
MOV B,#05H
MUL AB
ADD A,R0
MOV R0,A
MOV A,R7
MOV B,#09H
MUL AB
MOV B,#0AH
DIV AB
MOV 42H,A
MOV A,B
ADD A,R0
ADD A,40H
MOV B,#0AH
DIV AB
MOV R0,B
MOV R3,A
MOV A,R2
MOV B,#02H
MUL AB
ADD A,R3
ADD A,42H
MOV B,#0AH
DIV AB
MOV R4,A
MOV R5,B
MOV A,R7
MOV B,#04H
MUL AB
ADD A,R4
MOV B,#01H
MUL AB
ADD A,R5
MOV P1,A
MOV A,R0
MOV B,#10H
MUL AB
ADD A,R1
MOV P2,A
LAST:MOV TH0,#3CH
MOV TL0,#0B0H
MOV TH1,#00H
MOV TL1,#00H
SETB TR1
SETB TR0
RETI
END
本文来源:https://www.wddqw.com/doc/36fedf53f5335a8103d22002.html
正在阅读:
单片机课程设计报告源程序01-01
英语自我介绍01-01
乔迁之喜对联01-01
公司辩论赛主持词01-01
形容心情悲哀的成语01-01
框架合同和落地合同01-01
善意的谎言辩论会100字的观点01-01
最新本科民法论文格式01-01
访环卫工人有感01-01