这是我写的,但是不能实现
ORG 0000H
AJMP START
ORG 001BH
AJMP INT_T0
ORG 0060H
START:;MOV SCON,#00H
MOV SP,#60H
MOV TMOD,#10H
MOV TL1,#0B0H
MOV TH1,#3CH
MOV R0,#00H
MOV R1,#10
SETB TR1
SETB ET1
SETB EA
CLR TI
CLR RI
SJMP $
INT_T0:
PUSH ACC
PUSH PSW
PUSH DPL
PUSH DPH
CLR TR1
MOV TL1,#0B0H
MOV TH1,#3CH
DJNZ R1,L0
L0:
MOV DPTR,#07FFFH
MOV A,#82H
MOVX A,@DPTR
MOV DPTR,#07DFFH
MOV A,R0
; MOV A,#00H
MOVX A,@DPTR
JNB ACC.0,L
RETI
L1: MOV DPTR,#07FFFH
MOV A,#82H
MOVX A,@DPTR
MOV DPTR,#07DFFH
MOV R0,#01H
MOV A,R0
MOVX A,@DPTR
JNB ACC.1,L
RETI
L:
MOV DPTR,#07FFFH
MOV A,#82H
MOVX @DPTR,A
MOV DPTR,#07CFFH
MOV A,R0
MOV DPTR,#TAB
MOVC A,@A+DPTR
MOVX @DPTR,A
; ACALL EXIT
; ACALL EXIT
; ACALL EXIT
; ACALL EXIT
;CLR A
; MOVX @DPTR,A
;AJMP START
EXIT:
SETB TR1
POP DPH
POP DPL
POP PSW
POP ACC
RETI
TAB: DB 40H,79H,30H,24H,19H,92H,02H,78H
END |