汇编语言程序,八个灯,跑马灯
发布网友
发布时间:2022-05-12 21:37
我来回答
共1个回答
热心网友
时间:2023-10-24 03:15
ORG 0000H
LJMP MAIN
ORG 000BH
LJMP T0ISR
ORG 0030H
MAIN:
MOV SP,#5FH
MOV TMOD,#01H
MOV TH0,#HIGH(65536-50000)
MOV TL0,#LOW(65536-50000)
SETB TR0
SETB ET0
SETB EA
MOV A,#0FEH
MOV P0,A
MOV R2,#20
SJMP $
T0ISR:
CLR TR0
MOV TH0,#HIGH(65536-50000)
MOV TL0,#LOW(65536-50000)
SETB TR0
DJNZ R2,T0E
MOV R2,#20
RL A
MOV P0,A
T0E:
RETI
END