C51单片机60十秒延迟子程序,汇编语言,谢谢你。

2024-12-03 17:05:23
推荐回答(2个)
回答1:

DELAY60S:
MOV R2,#60

DELAY1S:
MOV R3,#200

DELAY5MS:
MOV R4,#10

DELAYU:
MOV R5,#250

DJNZ R5,$

DJNZ R4,DELAYU

DJNZ R3,DELAY5MS

DJNZ R2,DELAY1S

RET

回答2:

DELAY60S:
MOV R4,#0EFH
DL2:
MOV R7,#9DH
DL1:
MOV R6,#0E4H
DL0:
MOV R5,#02H
DJNZ R5,$
DJNZ R6,DL0
DJNZ R7,DL1
DJNZ R4,DL2
NOP