请各位大侠们,帮我看看,这个程序对不对
作业题目:用汇编语言实现跑马灯作业要求:用发光二极管实现跑马灯效果,八个发光二极管从上到下跑两遍,闪两下;
然后从下到上跑两遍,闪两下。
LED EQU P1
ORG 0000H
LJMP Start
ORG 0030H
Start: MOV A,#0FEH;初值11111110送入A
MOV R4,#2 ;判断P1循环移位的次数
MOV R0 #2;判断循环移位后发光二极管全清零的次数
MOV R3,#7 ;R3单元作计数器,初值位左移的次数
NEXT: MOV LED,A
MOV R5 ,#20
ACALL DELAY
AA: RL A
DJNZ R3,NEXT
MOV R3,#7
DJNZ R4, AA
BB: CRL A
DJNZ R0,BB
NEXT1:MOV LED,A
LCALL DELAY
CC: RR A
DJNZ R3,NEXT1
MOV R3, #7
DJNZ R4,CC
BB: CLR A
DJNZ R0,BB
AJMP Start
DELAY: MOV R6,#50H
L1:MOV R7,#100H
DJNZ R7,$
DJNZ R6,L1
DJNZ R5,DELAY
RET
END