4. DS12887应用子程序
DS12887: CLR P2.7
INTTIM:MOV DPTR,#7F0BH
MOV A,#0A2H ;选BCD码,24小时制
MOVX @DPTR,A
MOV DPTR,#7F04H ;HOUR单元地址
MOV A,#07H
MOVX @DPTR,A
inc dptr
mov a,#08h
movx @dptr,a
www.751com.cn
mov a,#00h
movx @dptr,a
MOV DPTR,#7F00H ;SEC0ND单元地址
MOV A,#58H
MOVX @DPTR,A
inc dptr
mov a,#00h
movx @dptr,a
MOV DPTR,#7F0AH ;寄存器A地址
MOV A,#20H ;############
MOVX @DPTR,A
MOV DPTR,#7F0CH ;寄存器C地址
MOVX A,@DPTR
INC DPTR
MOVX A,@DPTR ;寄存器D地址
MOV DPTR,#7F0BH ; 寄存器B地址
MOV A,#22H
MOVX @DPTR,A
MOV IE,#84H RET
上一页 [1] [2] [3] [4] [5] [6] [7] [8] 下一页