|
主题 : : 急求数字时钟汇编程序解析和流程图,高手们救命啊 [待解决] |
回复[ 0次 ]
点击[ 422次 ] | |
荣誉值:0
信誉值:0
注册日期:2009-05-31 16:30 |
哪位高手帮忙解析一下一下的程序,安主程序,子程序,中断程序解析.另外求这个程序的流程图.高手们帮帮忙,小弟不胜感激!!!!!!
AJMP MAIN
ORG 03H
MOV P3,#0FFH
AJMP AJ2
RETI
ORG 13H
MOV P3,#0FFH
AJMP AJ1
RETI
ORG 1BH
MOV TH1,#0ECH
MOV TL1,#78H
DJNZ R6,BACK
MOV R6,#200
AJ: MOV R0,#35H ;秒
INC @R0
CJNE @R0,#10,$+3
JC BACK
MOV @R0,#0
MOV R0,#34H
INC @R0
CJNE @R0,#6,$+3
JC BACK
MOV @R0,#0
AJ1: MOV R0,#33H ;分
INC @R0
CJNE @R0,#10,$+3
JC BACK
MOV @R0,#0
MOV R0,#32H
INC @R0
CJNE @R0,#6,$+3
JC BACK
MOV @R0,#0
AJ2: MOV R0,#31H ;时
INC @R0
CJNE @R0,#4,$+3
JC BACK
CJNE @R0,#5,$+3
JC S24
CJNE @R0,#10,$+3
JC BACK
MOV @R0,#0
MOV R0,#30H
INC @R0
BACK: RETI
S24: DEC R0
CJNE @R0,#2,$+3
JC BACK
MOV @R0,#0
MOV 31H,#0
RETI
MAIN: MOV R1,#30H
MOV @R1,#0
INC R1
CJNE R1,#36H,MAIN+2
MOV P3,#0FFH
MOV P0,#0
MOV DPTR,#SEGPT
MOV R6,#200
MOV TMOD,#10H
MOV TH1,#0ECH
MOV TH1,#78H
SETB IT0
SETB IT1
MOV IP,#15H
MOV IE,#9FH
SETB TR1
LOOPO: MOV R1,#30H
MOV R7,#20H
LOOPI: MOV P2,#0
MOV A,@R1
MOVC A,@A+DPTR
MOV P1,A
MOV P2,R7
INC R1
MOV A,R7
RR A
MOV R7,A
CJNE R7,#80H,LOOPI
SJMP LOOPO
SEGPT: DB 40H,79H,24H,30H,19H,12H,2,78H,0,18H
END | | |